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

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

#include <Transportation.h>

Public Member Functions

void addRoad (Road road)
 Adds a road to the road system.
 
void upgrade ()
 Upgrades the road system.
 
int getUtilization ()
 Gets the overall utilization of the road system.
 
vector< Road > & getRoads ()
 Gets the list of roads in the system.
 

Detailed Description

Manages multiple roads and their respective public transport systems.

This class tracks the number of roads and their utilization.

Member Function Documentation

◆ addRoad()

void RoadSystem::addRoad ( Road road)

Adds a road to the road system.

Parameters
roadThe Road object to add.

◆ getRoads()

vector< Road > & RoadSystem::getRoads ( )

Gets the list of roads in the system.

Returns
A reference to the vector of roads.

◆ getUtilization()

int RoadSystem::getUtilization ( )

Gets the overall utilization of the road system.

Returns
The utilization percentage.