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

Manages the tax collection system for the city. More...

#include <TaxSystem.h>

Public Member Functions

 TaxSystem ()
 Constructs a TaxSystem object.
 
 ~TaxSystem ()
 Destroys the TaxSystem object.
 
void setTaxStrategy (TaxStrategy *strategy)
 Sets the current tax strategy.
 
void toggleStrategy ()
 Toggles the current tax strategy between available strategies.
 
void collectTax (CityGrowth *growth)
 Collects taxes based on the current tax strategy.
 
float getCollectedTaxes ()
 Gets the total taxes collected.
 
std::string currentStrategy ()
 Retrieves the name of the current tax strategy.
 

Detailed Description

Manages the tax collection system for the city.

The TaxSystem class is responsible for setting the tax strategy, collecting taxes, and keeping track of the total taxes collected. It allows for toggling between different tax strategies.

Member Function Documentation

◆ collectTax()

void TaxSystem::collectTax ( CityGrowth * growth)

Collects taxes based on the current tax strategy.

Parameters
growthPointer to a CityGrowth object used to gather relevant data for tax calculation.

◆ currentStrategy()

std::string TaxSystem::currentStrategy ( )

Retrieves the name of the current tax strategy.

Returns
A string representing the current tax strategy.

◆ getCollectedTaxes()

float TaxSystem::getCollectedTaxes ( )

Gets the total taxes collected.

Returns
The total amount of taxes collected.

◆ setTaxStrategy()

void TaxSystem::setTaxStrategy ( TaxStrategy * strategy)

Sets the current tax strategy.

Parameters
strategyPointer to a TaxStrategy object to be set as the current strategy.