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

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

#include <TaxSystem.h>

Inheritance diagram for ProgressiveTaxStrategy:
TaxStrategy

Public Member Functions

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

Detailed Description

Concrete implementation of a progressive tax strategy.

This class calculates taxes based on a progressive rate structure, where higher incomes are taxed at higher rates.

Member Function Documentation

◆ calculateTax()

float ProgressiveTaxStrategy::calculateTax ( CityGrowth * growth)
virtual

Calculates the tax based on the progressive tax rate.

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

Implements TaxStrategy.

◆ getStrategy()

std::string ProgressiveTaxStrategy::getStrategy ( )
virtual

Gets the name of the progressive tax strategy.

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

Implements TaxStrategy.