Represents a public transport system, such as buses or trains. More...
#include <Transportation.h>
Public Member Functions | |
| PublicTransport (int capacity, string type, string TransportType) | |
| Constructs a PublicTransport object. | |
| void | add (int amount) |
| Adds a specified number of vehicles to the transport system. | |
| void | upgrade () |
| Upgrades the transport system. | |
| int | getAmount () |
| Gets the current number of vehicles in operation. | |
Represents a public transport system, such as buses or trains.
This class manages the type of transport, its capacity, and the current amount of vehicles.
| PublicTransport::PublicTransport | ( | int | capacity, |
| string | type, | ||
| string | TransportType ) |
Constructs a PublicTransport object.
| capacity | The maximum capacity of the transport system. |
| type | The type of public transport. |
| TransportType | The specific transport classification. |
| void PublicTransport::add | ( | int | amount | ) |
Adds a specified number of vehicles to the transport system.
| amount | The number of vehicles to add. |
| int PublicTransport::getAmount | ( | ) |
Gets the current number of vehicles in operation.