TravelCard

class TravelCard(val id: Int)

A TravelCard object represents a travel card meant for accessing public transportation. A travel card may be valid or invalid; a card’s status can be set as invalid, if the allocated time expires or if the card is stolen, for instance.

Value parameters:
id

a number that identifies the travel card from others

class Object
trait Matchable
class Any

Value members

Concrete methods

override def toString: String

Returns a compact string description of the person.

Returns a compact string description of the person.

Definition Classes

Concrete fields

val id: Int

whether the travel card is valid or not

whether the travel card is valid or not