Write a Java program without a graphical user interface that calculates and displays the mortgage payment amount given the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage. In this program, hard code the amount = $200,000, the term = 30 years, and the interest rate = 5.95%. Insert comments in the program to document the program.
The following mortgage formula should be used for all the individual assignments.
MonthlyPayment = [MortgageAmount * (1 + MonthlyInterestRate)TotalMonth * MonthlyInterestRate] /
[(1 + MonthlyInterestRate)TotalMonth - 1]
Please note that the number used below is for illustration purpose only. You should refer to the assignment question for mortgage detail.
Suppose you take out a 30 year mortgage for $100,000 at 7% interest, and want to know the monthly payments. To do that, you divide the interest rate by 12 to get (.07/12) = .00583; and multiply 30 x 12 = 360 to get the number of payments. Then the formula gives you:
payment = [$100,000 * (1 + .00583)360 * .00583] / [(1 + .00583)360 - 1]
The expert examines a Java program for user interfaces.