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:

  1. Create a program class named TestLoops This class should have a main() method that behaves as follows:
  2. Prompt the user for the base price of the car.
  3. Perform error checking to ensure that the price is between $30,000 and $70,000.
  4. Prompt the user for the cost of the additional features for your car.
  5. Using a different looping structure, perform error checking to ensure the inputted value is between $10,000 and $25,000.
  6. Instantiate an object of the Vehicle class named myCar using the 2 verified inputs.
  7. Calculate the total price for the car.
  8. Instantiate another object of the Vehicle class with a base price of $25,000 named teachersCar.
  9. Assign $5,000 to the additional features of the object.
  10. Calculate the total price for the car.
  11. 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
  1. Create a loop that runs for 5 months to ensure you are getting the results below

  1. Modify the loop to run for 6 years
  2. Compile and execute the code to ensure correct results.
  3. Dont forget to include descriptive and detailed comments in your code!!!

Part II

  1. Create an amortization schedule for your vehicle.
  2. Create a method that creates an amortization schedule and call the method for both schedules.
  3. Create a class variable that stores the interest rate for the loans and make necessary modifications.
  4. 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 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!