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

Concrete implementation of a flat tax strategy. More...

#include <TaxSystem.h>

Inheritance diagram for FlatTaxStrategy:
TaxStrategy

Public Member Functions

virtual float calculateTax (CityGrowth *growth)
 Calculates the tax based on the flat tax rate.
 
virtual std::string getStrategy ()
 Gets the name of the flat tax strategy.
 
- Public Member Functions inherited from TaxStrategy
virtual ~TaxStrategy ()=default
 Destroys the TaxStrategy object.
 

Detailed Description

Concrete implementation of a flat tax strategy.

This class calculates taxes using a flat rate, where all incomes are taxed at the same percentage.

Member Function Documentation

◆ calculateTax()

float FlatTaxStrategy::calculateTax ( CityGrowth * growth)
virtual

Calculates the tax based on the flat tax rate.

Parameters
growthPointer to a CityGrowth object used to gather relevant data for tax calculation.
Returns
The calculated tax amount using the flat tax strategy.

Implements TaxStrategy.

◆ getStrategy()

std::string FlatTaxStrategy::getStrategy ( )
virtual

Gets the name of the flat tax strategy.

Returns
A string representing the name of the flat tax strategy.

Implements TaxStrategy.