Miscellaneous Docs
Fall 2026
API

# Excursion

o1.excursion.Excursion
class Excursion(val `name`: String, val `limit`: Int)

The class `Excursion` represents group trips that would-be participants need to sign up for in advance.

## Parameters

limit

  the maximum number of people that can participate

name

  the name of the excursion

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any

## Members list

### Value members

#### Concrete methods

def isFull: Boolean

Determines whether the excursion is full, that is, if as many or more people have registered an interest in the excursion as can take part.

Determines whether the excursion is full, that is, if as many or more people have registered an interest in the excursion as can take part.

## Attributes

def lastParticipant: Option[String]

Determines the latest person who has registered an interest in participating and who fits in. The person’s name is wrapped in an `Option`; `None` is returned if there are no participants at all.

Determines the latest person who has registered an interest in participating and who fits in. The person’s name is wrapped in an `Option`; `None` is returned if there are no participants at all.

## Attributes

def numberOfInterested: Int

Returns the number of people who have registered an interest in taking part in the excursion. (This number may exceed the limit.)

Returns the number of people who have registered an interest in taking part in the excursion. (This number may exceed the limit.)

## Attributes

See also

  registerInterest

def numberOfParticipants: Int

Returns the number of people that will take part in the excursion, as things stand. This will be a number between 0 (if nobody has registered an interest) and `limit` (if the excursion is full).

Returns the number of people that will take part in the excursion, as things stand. This will be a number between 0 (if nobody has registered an interest) and `limit` (if the excursion is full).

## Attributes

def queueSize: Int

Returns the number of people queuing up for places. Unless the excursion is full, this number will be zero.

Returns the number of people queuing up for places. Unless the excursion is full, this number will be zero.

## Attributes

def registerInterest(`newPersonName`: String): Boolean

Registers the given person as wishing to participate in the excursion.

Registers the given person as wishing to participate in the excursion.

## Attributes

Returns

  `true` if there was place for the new participant, `false` if the person was placed in queue instead

override def toString: String

Returns a textual description of the excursion.

Returns a textual description of the excursion.

## Attributes

Definition Classes
  Any

#### Concrete fields

val limit: Int
val name: String