o1.people
Members list
Type members
Classlikes
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.
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.
Parameters
- id
-
a number that uniquely identifies the member from other members of the society
- name
-
the member’s name
- yearOfBirth
-
the year the member was born
- yearOfDeath
-
the year the member died (wrapped in an
Option
;None
if the member is alive)
Attributes
- Supertypes
Each instance of class Passenger
represents an individual passenger in an imaginary traffic-related application.
Each instance of class Passenger
represents an individual passenger in an imaginary traffic-related application.
Parameters
- card
-
a travel card associated with the person, if there is one;
None
indicates that there isn’t - name
-
the passenger’s name
Attributes
- Supertypes
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.
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.
Parameters
- id
-
a number that identifies the travel card from others
Attributes
- Supertypes