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

Manages multiple railways and their respective public transport systems. More...

#include <Transportation.h>

Public Member Functions

void addRailway (Railway railway)
 Adds a railway to the rail system.
 
void upgrade ()
 Upgrades the rail system.
 
int getUtilization ()
 Gets the overall utilization of the rail system.
 

Detailed Description

Manages multiple railways and their respective public transport systems.

This class tracks the number of railways and their utilization.

Member Function Documentation

◆ addRailway()

void RailSystem::addRailway ( Railway railway)

Adds a railway to the rail system.

Parameters
railwayThe Railway object to add.

◆ getUtilization()

int RailSystem::getUtilization ( )

Gets the overall utilization of the rail system.

Returns
The utilization percentage.