31 lines
611 B
Java
31 lines
611 B
Java
|
|
public abstract class Loan
|
|
{
|
|
protected String m_name;
|
|
protected double m_interestRate;
|
|
protected int m_length;
|
|
protected double m_principal;
|
|
protected double m_monthlyPayment;
|
|
|
|
public Loan(String name, double rate, int years, double amount)
|
|
{
|
|
m_name = name;
|
|
m_interestRate = rate;
|
|
m_length = years;
|
|
m_principal = amount;
|
|
}
|
|
|
|
public String process()
|
|
{
|
|
calcMonthlyPayment();
|
|
return makeSummary();
|
|
}
|
|
|
|
public abstract void calcMonthlyPayment();
|
|
|
|
public String makeSummary()
|
|
{
|
|
return "Summary!";
|
|
}
|
|
}
|