/* * Loan.java * * Created on March 1, 2007, 5:46 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package lab05; import java.text.*; /** * * @author bowenss26 */ public class Loan { private String borrowerName; private int loanId; private double downpayment; private double propertyCost; private int numberOfYears; private double annualInterestRate; private DecimalFormat prec2 = new DecimalFormat("$#.00"); public constructor(nam, id, propCost, downPay, numYears) { } public getBorrowerName(){ } public getLoanId(){ } public getDownPayment(){ } public getPropertyCost(){ } public getNumberOfYears(){ } public getAnnualInterestRate(){ } /** Creates a new instance of Loan */ public Loan(borrowerName, loanId, propCost, downPayment, numberOfYears) { } public double calculateMonthlyPayment() { double result = 0; result = loanId * (annualInterestRate/1200) / (1 - 1 / Math.pow (1 + (annualInterestRate/1200), numberOfYears * 12)); return result; } public String toString() { } }