public double Calculate(SalaryOverview salary) { return(CurrentSalaryMinusFiveBasicSalariesDiff(salary) * 0.20 + 5 * salary.BasicSalary * 0.15); }
private double CurrentSalaryMinusFiveBasicSalariesDiff(SalaryOverview salary) => salary.CurrentSalary - 5 * salary.BasicSalary;
public CalculationStrategyFactory(SalaryOverview data) { _salary = data; }
public SalaryCalculator(SalaryOverview data) { _salary = data; _strategy = new CalculationStrategyFactory(data).Salary(); }
public double Calculate(SalaryOverview salary) { return(salary.CurrentSalary * 0); }