Home > .NET, C/C++, Java, Javascript > Java Program

Java Program

December 20th, 2009

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 the project AngusWeek4.java
Note:
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


Java Program

Comments are closed.
Bear