1 2 public class CapitalStrategyTermLoan extends CapitalStrategy { 3 4 @Override 5 public double capital(Loan loan) { 6 return loan.getCommitment() * duration(loan) * riskFactorFor(loan); 7 } 8 9 private double riskFactorFor(Loan loan) { 10 return 2.0; 11 } 12 13 private double duration(Loan loan) { 14 return 1.0; 15 } 16 17 }