Sr-mf-003 Mortgage Payment Calculator

This is a 4 part project. Part 1 needs to completed by this Sunday 7/11/2010

Please insert comments that a novice like myself can understand.

Part 1

A program written in Java (without a graphical user interface) that will calculate and display the monthly payment amount to fully amortize a $200,000.00 loan over a 30 year term at 5.75‰ interest. Insert comments in the program to document the program. Attach a design flow chart to the program’s source code.

Formula for mortgage payment calculation:

a = [P(1 + r)nr]/[(1 + r)n – 1] — where P is the principal amount, r is the interest rate and n is the term in years.

Formulas to calculate the monthly payment and balance:

interestRate = .0575;
amount = 200000;
term = 30;
monthlyInterestRate = interestRate / 12;
totalMonths= term * 12;
payment = amount * monthlyInterestRate / (1-(Math.pow((1+monthlyInterestRate ),(-totalMonths))));

Formulas to calculate the amortization:

interestPaid = loanBalance * montlyInterestRate;
principalPaid = payment – interestPaid;
loanBalance = loanBalance – principalPaid;
//loanBalance is a running number, the initial value is equal to amount

Part 2

Change Request 1

Write the program in Java (without a graphical user interface) using a loan amount of $200,000 with an interest rate of 5.75% and a 30 year term. Display the mortgage payment amount and then list the loan balance and interest paid for each payment over the term of the loan. If the list would scroll off the screen, use loops to display a partial list, hesitate, and then display more of the list.

Part 3

Change Request 2

Write the program in Java (without a graphical user interface) and have it calculate the payment amount for 3 mortgage loans:

– 7 year at 5.35%
– 15 year at 5.5%
– 30 year at 5.75%

Use an array for the different loans. Display the mortgage payment amount for each loan.

Part 4

Change Request 3

Write the program in Java (without a graphical user interface) and have it calculate the payment amount for 3 mortgage loans:

– 7 year at 5.35%
– 15 year at 5.5%
– 30 year at 5.75%

Use an array for the different loans. Display the mortgage payment amount for each loan and then list the loan balance and interest paid for each payment over the term of the loan. Use loops to prevent lists from scrolling off the screen.

Leave a Reply

Your email address will not be published. Required fields are marked *