Miscellaneous Docs
Fall 2026
API

# o1.people

package o1.people

## Members list

### Type members

#### Classlikes

class Member(val `id`: Int, val `name`: String, val `yearOfBirth`: Int, val `yearOfDeath`: Option[Int])

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
  class Object
  trait Matchable
  class Any

class Passenger(val `name`: String, val `card`: Option[TravelCard])

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
  class Object
  trait Matchable
  class Any

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.

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
  class Object
  trait Matchable
  class Any