Represents a road for public transport vehicles. More...
#include <Transportation.h>
Public Member Functions | |
| Road (int maxBusses, string type) | |
| Constructs a Road object. | |
| void | addBus (PublicTransport bus) |
| Adds a bus to the road. | |
| string | getType () const |
| Gets the type of the road. | |
| int | getNumBusses () |
| Gets the current number of buses on the road. | |
| int | getMaxNumOfBusses () |
| Gets the maximum number of buses allowed on the road. | |
Represents a road for public transport vehicles.
This class maintains a list of public transport vehicles and manages their operations.
| Road::Road | ( | int | maxBusses, |
| string | type ) |
Constructs a Road object.
| maxBusses | The maximum number of buses that can operate on this road. |
| type | The type of the road. |
| void Road::addBus | ( | PublicTransport | bus | ) |
Adds a bus to the road.
| bus | The PublicTransport object representing the bus to add. |
| int Road::getMaxNumOfBusses | ( | ) |
Gets the maximum number of buses allowed on the road.
| int Road::getNumBusses | ( | ) |
Gets the current number of buses on the road.
| string Road::getType | ( | ) | const |
Gets the type of the road.