Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help java code(with Detailed comment ), and run completely. The program should request information from the user in the following format Methods and Method
Need help java code(with Detailed comment), and run completely.
The program should request information from the user in the following format
Methods and Method Overloading (150 pts.) You will write the Java code for a program that uses a method to calculate the monthly payment for a loan. The formula for calculating a payment is shown further down. This application will produce a list of possible loan payments based on a series of annual interest rates starting with a user entered starting annual interest rate which is incremented in a loop until it reaches a user entered ending annual interest rate. The rate will be incremented by an increment rate which the user also enters In summary the user will need to enter A starting annual interest rate such as 4.000%, which is the decimal value 0.0400 An ending annual interest rate such as 6.000%, which is the decimal value 0.0600 The rate by which the starting rate will increment as it progresses towards the ending rate such as 0.25% which is the decimal value 0.0025 The first number of years over which the loan will be repaid such as 15 The last number of years over which the loan will be repaid such as 30 The number of years by which the starting term will increment as it progresses towards the ending term such as 5 a loan amount such as 100,000 dollars . - - - - - The main method will Acquire input from the user Invoke the payment calculation method within a loop - s program requires nested loops- an outer loop controlled by controlled by the Hint: thi interest rate as it progresses from the stating rate to the ending and an inner loop rate the term as it progresses from the stating term to the ending term. It will calculate the payment and display them from inside the inner loop Since the user enters annual rates and the number of years for the loan, the program will need to convert the annual values to monthly values: Calculate the monthly interest rate, which we'll abbreviate as mir (monthly interest rate), as the annual rate divided by 12 Calculate the numbers of months over which the loan will be repaid, which we'll abbreviate as mtp (months to pay), as the number of years times* 12 - - Here's how to calculate a loan payment Annuity Factor -(mir*(1+mir)Amtp)/(((1+mir)Amtp)-1) Assuming a 30 year loan for $180,000 and an annual rate of 0.0375 (3.75%)the results of substituting the values in the formula are Annuity Factor(0.003125*(1+0.003125)A360)/(1+0.003125A360)-1)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started