1 2 public class CapitalStrategyAdvisedLine extends CapitalStrategy { 3 4 @Override 5 public double capital(Loan loan) { 6 return loan.getCommitment() * loan.getUnusedPercentage() * 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 }