Packages

c

o1.people

TravelCard

class TravelCard extends AnyRef

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TravelCard
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TravelCard(id: Int)

    id

    a number that identifies the travel card from others

Value Members

  1. val id: Int
  2. var isValid: Boolean

    whether the travel card is valid or not

  3. def toString: String

    Returns a compact string description of the person.

    Returns a compact string description of the person.

    Definition Classes
    TravelCard → AnyRef → Any