// 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);
}