Create a function prints a loan amortization table


Discuss the below:

Q: Create a function that prints a loan amortization table (principal, interest rate, and number of months) are provided via form elements. The principal amount and interest rate should be entered through a text box. However, the number of months should be entered through a drop down list containing the values 12, 24, 36, 48, and 60. A button to perform the calculation should be created, and the inputs should be grouped in a field set. When the button is pressed, a HTML

element should be updated to hold the table.The input parameters are a loan amount (floating point), an interest rate (floating point), and a number of months for payoff (integer). The function should return a string containing an HTML table.

You will then calculate a monthly payment based on the following formula:

M=P(r/1-(1+r)-n)

Where:
• M is the monthly payment
• P is the principal amount (the amount of the loan)
• r is the monthly interest rate (i.e. 1/12th of the annual interest rate)
• n is the number of payments (i.e. the number of months of the loan)

Furthermore, we can calculate how much of the monthly payment is applied to the interest, and how much is applied to the principal by the formula:

i=Pr

Where:
• i is the amount of interest
• P is the remaining principal amount
• r is the monthly interest rate

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a function prints a loan amortization table
Reference No:- TGS01938208

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)

©TutorsGlobe All rights reserved 2022-2023.