Question: * PLEASE DO NOT USE THIS. OR STRING BUILDER. Java class Create a program called Loan Amount. This will display how many months it will
* PLEASE DO NOT USE "THIS." OR "STRING BUILDER".
Java class
Create a program called Loan Amount. This will display how many months it will take to pay off the loan.
The program needs the purchase cost, the annual interest rate in percent, and monthly payments.
The monthly interest rate is calculated once and is calculated as interestRate/12.
Suppose you purchased a kitchen appliance that costs $1000. The credit plan on your purchase is: no down payment, an interest rate of 18% per year, which means 1.5% per month, and a monthly payment of $50. The monthly payment of $50 is used to pay the interest and whatever is left is used to pay part of the remaining debt.
The first month you pay 1.5% of $1000 in interest. That is $15 in interest. So, the remaining $35 is deducted from your debt, which leaves you with the debt of $965.00.
The next month you pay interest of 1.5% of $965.00, which is 14.48. Hence $35.52 (which is $50 - $14.48) are deducted from the amount you owe.
The program must be able to calculate the amount of interest and the size of the debt after each month. This calculation must be a separate method so it can be called separately from the print method below.
The program must print the data about the loan amount in a table showing the remaining debt and the number of months it will take to pay off the debt. Your program should count the number of months until the debt is not less than the monthly payment, that means the last payment may be less than $50.
To keep the program flexible, the code to calculate the remaining amount of debt must be a separate method so this method can be called from the method which handles printing.
In your program (preferably setters), include reasonability checks on the new value. For example, if the rate is less than 0, do not change the existing rate to the new value. If doing this validation in setters, be sure to call the setters inside the constructor of class to ensure the validity checks on the new value.
Tester class
Test out the Loan amount class in a tester class that holds a main method. Do the following using the appropriate constructor and methods:
Create the loan amount object
Create the Scanner object
Ask the cost, annual interest rate and monthly payment from the user.
* PLEASE DO NOT USE "THIS." OR "STRING BUILDER".
The out put should look like this:

Enter cost, monthly payment and interest rate 1000 50 18 Loan Amount: $1000.0 Annual Interest Rate, in percent: 18.0% Monthly Payment: $50.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
