Question: Part I: Create a program class named TestLoops This class should have a main() method that behaves as follows: Prompt the user for the base
Part I:
- Create a program class named TestLoops This class should have a main() method that behaves as follows:
- Prompt the user for the base price of the car.
- Perform error checking to ensure that the price is between $30,000 and $70,000.
- Prompt the user for the cost of the additional features for your car.
- Using a different looping structure, perform error checking to ensure the inputted value is between $10,000 and $25,000.
- Instantiate an object of the Vehicle class named myCar using the 2 verified inputs.
- Calculate the total price for the car.
- Instantiate another object of the Vehicle class with a base price of $25,000 named teachersCar.
- Assign $5,000 to the additional features of the object.
- Calculate the total price for the car.
- To help your instructor finance her vehicle, create an amortization schedule using the following guidelines:
- Initial Amount borrowed = total price of the teachers car
- Monthly payment = $532.00.
- Interest rate = 4%
- Years = 6.
- Interest calculation = (interest rate / 12 months) * current balance
- Applied principal = payment interest
- Current balance = current balance applied principal
- Create a loop that runs for 5 months to ensure you are getting the results below
- Modify the loop to run for 6 years
- Compile and execute the code to ensure correct results.
- Dont forget to include descriptive and detailed comments in your code!!!
Part II
- Create an amortization schedule for your vehicle.
- Create a method that creates an amortization schedule and call the method for both schedules.
- Create a class variable that stores the interest rate for the loans and make necessary modifications.
- Create a method that prompts the user for the inputs and instantiates the objects. Return the objects to the main() method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
