sudo apt-get marks
 
Loading...
Searching...
No Matches
Railway Class Reference

Represents a railway system for public transport. More...

#include <Transportation.h>

Public Member Functions

 Railway ()
 Constructs a Railway object.
 
void addTrain (PublicTransport train)
 Adds a train to the railway system.
 
int getNumTrains ()
 Gets the current number of trains in operation.
 

Detailed Description

Represents a railway system for public transport.

This class manages the number of trains and their operations.

Member Function Documentation

◆ addTrain()

void Railway::addTrain ( PublicTransport train)

Adds a train to the railway system.

Parameters
trainThe PublicTransport object representing the train to add.

◆ getNumTrains()

int Railway::getNumTrains ( )

Gets the current number of trains in operation.

Returns
The current number of trains.