package Refactoring.LongExample1.After1; public class CorporateClient extends Client { private final double retainer = 500; public double amountOwing(int daysWorked) { double base = baseAmount(daysWorked); return base - discountAmount(base); } public double baseAmount(int daysWorked) { return retainer + (daysWorked / 30.0) * monthlyRate(); } public double discountAmount(double base) { return 500.0 + base * 0.02; } private double monthlyRate() { return 500; } }