![]() |
add abstract class to existing code
// Mortgage.java: Encapsulate mortgage information
public static void main(String[] args) { MortgageInformation mi = new MortgageInformation(300000, 30, 5.75); AmortizationTable at = new AmortizationTable(mi); at.DisplayAmortizationTable(); public class MortgageInformation { private double annualInterestRate; private int numOfYears; private double loanAmount; private double principal, term, apr; public MortgageInformation() { /** Default constructor */ public Mortgage() { this(7.5, 30, 100000); } |
| All times are GMT +5.5. The time now is 03:31. |