Java Programming Homework :24 hours

profilejackminsqjr09
lab8loantable.pdf

CS1043 LAB 8 Generate a Table

Write a program that will output a table of monthly payments from an initial loan amount over a

range of 15 to 30 years in 5 year increments for several different interest rates. This program is

an exercise in formatting output.

One can compute a monthly payment based on the initial loan amount, annual percentage rate,

and loan duration in years. The monthly payment is calculated using this formula:

    11/1 0

 nn

rrrPm

Where m is the monthly payment, 0

P is the initial loan amount, and r is the monthly interest rate.

The monthly interest rate is the annual percentage rate divided by 12; r = APR/12. The value n is

the number of payment periods, n = number of years times 12 months/year.

Use these inputs:

 $100,000.00 (as the initial loan amount)

 3% (representing the low annual- interest rate of 3%)

 6% (representing the high annual- interest rate of 6%)

Your program will calculate and print a table showing the resulting monthly payment based on

the loan amount, loan interest rates, and duration of the loan. The interest rates will be displayed

from the low rate to the high rate in increments of 1/2 percent (.5%). The duration of the loan

will be for periods of 15, 20, 25, and 30 years.

Table of monthly payments for a dollar loan amount of $100000.00

Years: 15 20 25 30

_________________________________________________________________

3.0% xxx.xx xxx.xx xxx.xx xxx.xx

3.5% xxx.xx xxx.xx xxx.xx xxx.xx

4.0% xxx.xx xxx.xx xxx.xx xxx.xx

4.5% xxx.xx xxx.xx xxx.xx xxx.xx

5.0% xxx.xx xxx.xx xxx.xx xxx.xx

5.5% xxx.xx xxx.xx xxx.xx xxx.xx

6.0% xxx.xx xxx.xx xxx.xx xxx.xx

Use the monthly payment static method from the Lab-2 assignment.