Question: Write a Java program that can compute the interest on the next monthly mortgage payment. The program reads the balance and the annual percentage interest

Write a Java program that can compute the interest on the next monthly mortgage payment. The program reads the balance and the annual percentage interest rate (e.g.: for an interest rate of 4.25%, the user should enter 4.25) from the console. The program should check to be sure that the inputs of balance and the interest rate are not negative. After the computation, the program displays the interest amount as a floating-point number with 2 digits after the floating point.

Formula: the interest on the next monthly mortgage payment can be computed using the following formula:

Interest = balance x (annualInterestRate / 1200)

Important Notes:

  • Assumed that the user makes mistakes at most once forthe balance and once for the annual percentage interest rate while entering the data, i.e. he/she enters the correct value the next time right after being warned.
  • In Eclipse IDE, inside the newly created project HOMEWORK_1, students should create a new program, i.e. a class, named: Program_2 under a new package named PROBLEM_2for his/her work on this problem.

Write a Java program that can compute the interest on the next monthly mortgage payment. The program reads the balance and the annual percentage interest rate (e.g.: for an interest rate of 4.25%, the user should enter 4.25) from the console. The program should check to be sure that the inputs of balance and the interest rate are not negative. After the computation, the program displays the interest amount as a floating-point number with 2 digits after the floating point.

Formula: the interest on the next monthly mortgage payment can be computed using the following formula:

Interest = balance x (annualInterestRate / 1200)

Important Notes:

  • Assumed that the user makes mistakes at most once forthe balance and once for the annual percentage interest rate while entering the data, i.e. he/she enters the correct value the next time right after being warned.
  • In Eclipse IDE, inside the newly created project HOMEWORK_1, students should create a new program, i.e. a class, named: Program_2 under a new package named PROBLEM_2for his/her work on this problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!