public override decimal ApplyTax(decimal salary) { // TO DO: Original Method var salaryRange = GetSalaryRange(salary); salary -= (salary.ApplyPercentage(this.Aliquot[salaryRange]) - this.ParcelToDeduct[salaryRange]); return(salary); }
public override decimal ApplyTax(decimal salary) { #region Alternative Method var salaryRange = GetSalaryRange(salary); salary -= (this.DependentsCount * this.DeductionPerDependent); salary -= (salary.ApplyPercentage(this.Aliquot[salaryRange]) - this.ParcelToDeduct[salaryRange]); return(salary); #endregion }