Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

use a loop structure to create a loan amortization schedule based on user input

ID: 3550102 • Letter: U

Question

use a loop structure to create a loan amortization schedule based on user input for loan amount (principal), the number of months of the loan period, and the interest rate (expressed in an annual percentage rate or APR).  The program will display the monthly payment and the total of all payments as shown in the sample output below.

Instructions

In the output, no answer is to be displayed with more than 2 decimal points.

Care should be taken to write your code using proper formatting, including a header, appropriate indentation, and adequate code comments.

The program should also use good user dialog. The .java file and the .class file ONLY are to be included in a single .zip file for submission.

The program should continuously allow the user to enter data and generate new loan information until he/she enters an appropriate sentinel value.

Here is sample run of the assigned program (user input highlighted in yellow):

Welcome to the Loan Amortization Program of XYZ Banking

This program will help you determine the payment structure

      of your loan.

Let us get started:

Enter the loan amount you are requesting: $5839.00

Enter the number of months for the loan: 6

Enter the APR you have been quoted: 12.3%

The monthly payment will be: $1008.38

The total paid (with interest) will be: $6050.28

Your Amortization Schedule

Payment#        Interest         Principal         Balance

1                      $59.85          $948.53          $4890.47

2                      $50.13          $958.25          $3932.23

3                      $40.31          $968.07          $2964.16         

4                      $30.38          $977.99          $1986.16

5                      $20.36          $988.02          $988.14

6                      $10.23          $998.14          $0

Would you like to calculate another loan (Y/N): Y

Enter the loan amount you are requesting: $4964.78

Enter the number of months for the loan: 36

Enter the APR you have been quoted: 14.8%

(... create amortization schedule as shown in the example above)

Would you like to calculate another loan (Y/N): N

Thank you for using the Loan Amortization Program of XYZ Banking.

Goodbye.

Welcome to the Loan Amortization Program of XYZ Banking

This program will help you determine the payment structure

      of your loan.

Let us get started:


Enter the loan amount you are requesting: $5839.00

Enter the number of months for the loan: 6

Enter the APR you have been quoted: 12.3%


The monthly payment will be: $1008.38

The total paid (with interest) will be: $6050.28


Your Amortization Schedule


Payment#        Interest         Principal         Balance

1                      $59.85          $948.53          $4890.47

2                      $50.13          $958.25          $3932.23

3                      $40.31          $968.07          $2964.16         

4                      $30.38          $977.99          $1986.16

5                      $20.36          $988.02          $988.14

6                      $10.23          $998.14          $0


Would you like to calculate another loan (Y/N): Y


Enter the loan amount you are requesting: $4964.78

Enter the number of months for the loan: 36

Enter the APR you have been quoted: 14.8%

(... create amortization schedule as shown in the example above)


Would you like to calculate another loan (Y/N): N


Thank you for using the Loan Amortization Program of XYZ Banking.

Goodbye.

Explanation / Answer

This code is off by .03 cents. Can someone fix it?