public double SalaryCalc() { return(_yearlyBonus + _salarySupplement.SalaryCalc()); }
public double CalculateSalary(ISalarySuppliment salarySuppliment) { salarySuppliment.AddComponent(); // wrapper functionality return(salarySuppliment.SalaryCalc()); // delegate to the Decorator base class }
public double SalaryCalc() // delegate to the Decorator base class { return(_birthDayBonus + _salarySupplement.SalaryCalc()); }