Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The First National Bank of San Diego has tasked you to write a mortgage analyzer library for its loan officers to use. For this lab,
The First National Bank of San Diego has tasked you to write a mortgage analyzer library for its loan officers to use. For this lab, you are only required to create a set of Java classes that represent the applications business logic.
Using the following simple use cases implement a Java class eg MortgageAnalyzer and any potential Java interfaces for the following actions :
The user can enter the amount of the loan, the annual rate of interest, and the duration of the loan in months this will require public member functions that can be used to enter this information into the MortgageAnalyzer class.
The user can run a verification check on the information that was entered to make sure it is reasonable this can be a verify member function that returns a Boolean true on success.
If bad or anomalous data was entered in setting up details of the loan the user should be advised and allowed to correct the input data a public correctInput member function as an example.
Once the data is verified to be correct or reasonable the user should invoke a public member function on the class named calculateMortgageDetails to get the following example information using one or a series of API calls internal to the class:
Amount of Loan $
Annual Interest Rate
Duration of loan in months
Monthly payment $
Total interest paid $
The formula for the monthly payment is:
payment p r rn rn
where p is the principal amount of the loan, r is the monthly interest rate annual rate divided by given as a number between for percent and for percent and n is the duration of the loan number of pay periods eg The formula for the total interest paid is:
Total interest n payment p
In addition create a unit test for your library, and as an example, the following data can be used to test your program:
Input:
Amount of Loan $
Annual Interest Rate
Duration of loan in months
Output:
Monthly payment $
Total interest paid $
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