Imports System
Imports System.ComponentModel
Imports System.Collections
Imports Microsoft.VisualBasic

Public Class Swimmer

  Private frname, lname As String
  Private club As String
  Private tm As Single
  Private heat, lane As Integer

  Public Sub New(ByVal dataline As String)
    MyBase.new()

    Dim tok As New StringTokenizer(dataline, " ")
    Dim lnum As String
    Dim age As String
    Dim tmS As Times
    Dim s As String

    lnum = tok.nextToken          'numer toru
    frname = tok.nextToken        'imiê
    lname = tok.nextToken         'nazwisko
    age = tok.nextToken           'wiek
    club = tok.nextToken          'nazwa klubu
    s = tok.nextToken
    tmS = New Times(s)
    tm = tmS.getSingle            'uzyskany czas
  End Sub

  Public Function getTime() As Single
    getTime = tm
  End Function

  Public Function getName() As String
    getName = frname + " " + lname
  End Function

  Public Function getClub() As String
    getClub = club
  End Function

  Public Sub setLane(ByVal ln As Integer)
    lane = ln
  End Sub

  Public Function getLane() As Integer
    getLane = lane
  End Function

  Public Sub setHeat(ByVal ht As Integer)
    heat = ht
  End Sub

  Public Function getHeat() As Integer
    getHeat = heat
  End Function
End Class

