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

Represents the governing body responsible for managing the city. More...

#include <Government.h>

Public Member Functions

 Government ()
 Default constructor for Government.
 
 ~Government ()
 Destructor for Government.
 
void createBuilding ()
 Initiates the process of creating a new building in the city.
 
void createUtility ()
 Initiates the process of creating a new utility service.
 
void increaseMaterials ()
 Increases the amount of available materials for construction.
 
void naturalDisaster ()
 Responds to a natural disaster affecting the city.
 
void upgradeTransport ()
 Upgrades the transportation infrastructure in the city.
 
void cleanCity ()
 Cleans the city by managing waste and other factors.
 
void taxCitizens ()
 Taxes citizens to generate revenue for the city.
 
void changeTaxStartegy ()
 Changes the tax strategy employed by the government.
 
void repairUtilities ()
 Repairs utility services in the city.
 
void createCitizen (int numCitizens)
 Creates a specified number of citizens in the city.
 
float avgSatisfaction ()
 Calculates and returns the average satisfaction of citizens.
 
void updateSatisfaction (float amt)
 Updates the satisfaction level of citizens by a specified amount.
 
void updateBudget (double amt)
 Updates the budget by a specified amount.
 
void insuffcientTransporrt ()
 Handles insufficient transportation resources in the city.
 
void setDifficulty (int difficulty)
 Sets the difficulty level for managing city operations.
 
void printresources ()
 Prints the current resources available to the government.
 
void printSec ()
 Prints details about the sectors in the city.
 
void printSatisfaction ()
 Prints the satisfaction levels of citizens in the city.
 
void printUtilitiesDetails ()
 Prints details about the utility services in the city.
 
float getBudget ()
 Gets the current budget available to the government.
 
float getDebt ()
 Gets the current debt of the government.
 

Detailed Description

Represents the governing body responsible for managing the city.

The Government class is responsible for overseeing the city's resources, citizens, utilities, and various actions to enhance the city's growth and functionality. It manages the creation of buildings, utility services, taxation, and responses to natural disasters.

Member Function Documentation

◆ avgSatisfaction()

float Government::avgSatisfaction ( )

Calculates and returns the average satisfaction of citizens.

Returns
The average satisfaction score of the citizens.

◆ createCitizen()

void Government::createCitizen ( int numCitizens)

Creates a specified number of citizens in the city.

Parameters
numCitizensThe number of citizens to be created.

◆ getBudget()

float Government::getBudget ( )
inline

Gets the current budget available to the government.

Returns
The amount of cash in the budget.

◆ getDebt()

float Government::getDebt ( )
inline

Gets the current debt of the government.

Returns
The amount of debt held by the government.

◆ setDifficulty()

void Government::setDifficulty ( int difficulty)

Sets the difficulty level for managing city operations.

Parameters
difficultyThe level of difficulty for city management tasks.

◆ updateBudget()

void Government::updateBudget ( double amt)

Updates the budget by a specified amount.

Parameters
amtThe amount to adjust the budget.

◆ updateSatisfaction()

void Government::updateSatisfaction ( float amt)

Updates the satisfaction level of citizens by a specified amount.

Parameters
amtThe amount to adjust the satisfaction level.