Question: Objective To build a complete working Java program that applies methods and basic object oriented programming. Overview & Instruction Build a Java class that will

Objective

To build a complete working Java program that applies methods and basic object oriented programming.

Overview & Instruction

Build a Java class that will manage data and calculations related to an auto loan:

Class AutoLoan

Data

Term (years)

Interest rate (annual; as a percentage)

Initial principal (dollars)

Methods

Constructor(s) and set/get methods

Validate data

Calculate monthly payment

Calculate total payoff

Calculate minimum income to afford loan

Your solution should include two files: one containing the AutoLoan class including the data and method definitions and a second file to contain the "driver" application. Build your solution such that all interaction with the user is contained within the driver application.

Your application should essentially do the following:

Read the input from the user via dialog-based input and "set" into one object of AutoLoan the class.

Validate the input. If the information is invalid. Be sure to utilize the class member designated for error checking. This method should return a boolean value back to the driver class if any of the values "set" in the object are invalid.

If all data are valid, build contents of a summary output statement into one output dialog. Include the following:

Basic loan parameters (principal, rate, term)

Monthly Payment

Total Payoff

Minimum monthly income to maintain loan

Your class should include a method for basic error checking. Build this method to return true of all information "set" into the object is value and false otherwise. Include "common sense" tests for all member variables of the class. If any of the input values are incorrect, feel free to simply terminate the program. Any additional flexibility in error checking is optional.

The formula for monthly payment is below:

Note that the initial principal is represented as the variable PV. The indicated rate r is the monthly rate (i.e. the annual rate divided by 12) and the number of periods n is the number of months of the loan (years multiplied by 12).

It is recommended that your car loan payment for no more than 29% of your monthly income. Determine your recommended monthly gross income value based on this guideline.

r(PV) 1-(1+r)-n P = Payment PV = Present Value r = rate per period n = number of periods r(PV) 1-(1+r)-n P = Payment PV = Present Value r = rate per period n = number of periods

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!