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. | |
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.
| void TaxSystem::collectTax | ( | CityGrowth * | growth | ) |
Collects taxes based on the current tax strategy.
| growth | Pointer to a CityGrowth object used to gather relevant data for tax calculation. |
| std::string TaxSystem::currentStrategy | ( | ) |
Retrieves the name of the current tax strategy.
| float TaxSystem::getCollectedTaxes | ( | ) |
Gets the total taxes collected.
| void TaxSystem::setTaxStrategy | ( | TaxStrategy * | strategy | ) |
Sets the current tax strategy.
| strategy | Pointer to a TaxStrategy object to be set as the current strategy. |