package people
Type Members
- class Member extends AnyRef
Each instance of class
Member
represents an individual person, recorded by an (imaginary) society-membership app.Each instance of class
Member
represents an individual person, recorded by an (imaginary) society-membership app. A member has a number of basic attributes such as a name and a year of birth.Once created, a
Member
object is immutable; to represent changes in a person, one should create a new instance of the class. - class Passenger extends AnyRef
Each instance of class
Passenger
represents an individual passenger in an imaginary traffic-related application. - class TravelCard extends AnyRef
A
TravelCard
object represents a travel card meant for accessing public transportation.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.