Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   add abstract class to existing code (http://www.go4expert.com/forums/add-abstract-class-existing-code-t22370/)

alllenbaldwin 10Jun2010 07:49

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 01:11.