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. | |
Represents a railway system for public transport.
This class manages the number of trains and their operations.
| void Railway::addTrain | ( | PublicTransport | train | ) |
Adds a train to the railway system.
| train | The PublicTransport object representing the train to add. |
| int Railway::getNumTrains | ( | ) |
Gets the current number of trains in operation.