public void PayDay(Paycheck paycheck) { double grossPay = classification.CalculatePay(paycheck); paycheck.GrossPay = grossPay; method.Pay(paycheck); }
public void PayDay(Paycheck paycheck) { paycheck.GrossPay = PaymentClassification.CalculatePay(paycheck); paycheck.Deductions = Affiliation.CalculateDeductions(paycheck); PaymentMethod.Pay(paycheck); }
public void PayTShirt(TShirt tshirt) { foreach (var variation in _variations) { Console.WriteLine($"Applying {variation.GetType().Name}"); variation.Cost(tshirt); Console.WriteLine($"TShirt cost after applying {variation.GetType().Name} is: {tshirt.Price}"); } _paymentMethod.Pay(tshirt.Price); }
public void PayDay(Paycheck paycheck) { double grossPay = classification.CalculatePay(paycheck); double deductions = affiliation.CalculateDeductions(paycheck); double netPay = grossPay - deductions; paycheck.GrossPay = grossPay; paycheck.Deductions = deductions; paycheck.NetPay = netPay; method.Pay(paycheck); }