Can anyone help me? I have created a code but it does not display the numbers in 7 columns.
Here is my assignment requirements and I will attach my code as well. I do not have much time before submitting. Thanks.
Here is my assignment.
Java mortgage calculator
Write the program in Java (without a graphical user interface) and have it calculate the payment amount for 3 mortgage loans.
7 years at 5.35%
15 years at 5.5%
30 years 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.
Name your program file XXXWeek2.java, XXX is your last name. It is important to use your last name so that each students program file is unique. When your team evaluates the members program, the team will know whom the program belong to. Not naming the file will cause point deduction. Submit your .java file into your individual forum under the ASSIGNMENT THREAD.
1. The program should require two user input values.
2. The first input value is the loan amount.
3. The second input value is an indicator for displaying the balance and interest paid list.
4. Error checking should be done on the input loan amount to make sure that it is a positive number and is not zero.
5. If the input loan amount is wrong, show an error message and exit the program.
6. If the input loan amount is correct, proceed to compute.
7. If the indicator is not to show the list, then only show the mortgage payments. Below is an example:
Loan amount $200000
Loan Term Interest Rate Mortgage Payment
7 years 5.35% $2859.79
15 years 5.5% $1634.17
30 years 5.75% $1167.15
8. If the indicator is to show the list, the program should show the mortgage payments first as in step 7. Following the mortgage payments, the list should be shown in 7 columns. The column are:
Column 1 - payment number
Column 2 the first loan balance
Column 3 the first loan interest paid
Column 4 the second loan balance
Column 5 the second loan interest paid
Column 6 the third loan balance
Column 7 the third loan interest paid
See example below on a $200000 loan:
1 198031.88 891.67 199282.50 916.67 199791.19 958.33
2 196054.98 882.89 198561.71 913.38 199581.38 957.33
3 194069.27 874.08 197837.62 910.07 199370.56 956.33