Imports System.Collections

Public Class Kids
  Private kidList As ArrayList
  Private index As Short

  Public Sub New(ByRef Filename As String)
    MyBase.New()
    Dim sline As String
    Dim vbf As vbFile = New vbFile(Filename)
    Dim kd As Kid
    kidList = New ArrayList()
    vbf.OpenForRead()
    sline = vbf.readLine
    While sline.Length > 0
      kd = New Kid(sline)
      kidList.Add(kd)
      sline = vbf.readLine
    End While
    vbf.closeFile()
  End Sub

  Public Function getIterator() As Iterator
    Dim kiter As KidIterator = New KidIterator(kidList)
    Return kiter
  End Function

End Class
