Abstract base class for tax strategies. More...
#include <TaxSystem.h>
Public Member Functions | |
| virtual | ~TaxStrategy ()=default |
| Destroys the TaxStrategy object. | |
| virtual float | calculateTax (CityGrowth *growth)=0 |
| Calculates the tax based on the implemented strategy. | |
| virtual std::string | getStrategy ()=0 |
| Gets the name of the tax strategy. | |
Abstract base class for tax strategies.
This class defines the interface for different tax strategies that can be implemented. Each strategy will have its own method of calculating taxes.
|
pure virtual |
Calculates the tax based on the implemented strategy.
| growth | Pointer to a CityGrowth object used to gather relevant data for tax calculation. |
Implemented in FlatTaxStrategy, and ProgressiveTaxStrategy.
|
pure virtual |
Gets the name of the tax strategy.
Implemented in FlatTaxStrategy, and ProgressiveTaxStrategy.