Answered step by step
Verified Expert Solution
Link Copied!

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 e.g. 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 - $140000
Annual Interest Rate -8.00%
Duration of loan in months -360
Monthly payment - $1027.27
Total interest paid - $229,817.20
The formula for the monthly payment is:
payment = p * r *(1+ r)n /((1+ r)n 1)
where p is the principal amount of the loan, r is the monthly interest rate (annual rate divided by 12) given as a number between 0(for 0 percent) and 1(for 100 percent), and n is the duration of the loan (number of pay periods e.g.,360). 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 - $140000
Annual Interest Rate -8.00%
Duration of loan in months -360
Output:
Monthly payment - $1027.27
Total interest paid - $229,817.20

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

e. What difficulties did they encounter?

Answered: 1 week ago