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

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PublicTransport()

PublicTransport::PublicTransport ( int capacity,
string type,
string TransportType )

Constructs a PublicTransport object.

Parameters
capacityThe maximum capacity of the transport system.
typeThe type of public transport.
TransportTypeThe specific transport classification.

Member Function Documentation

◆ add()

void PublicTransport::add ( int amount)

Adds a specified number of vehicles to the transport system.

Parameters
amountThe number of vehicles to add.

◆ getAmount()

int PublicTransport::getAmount ( )

Gets the current number of vehicles in operation.

Returns
The current amount of vehicles.