Question: Topic 12: Exceptions Requirements chapter 12 zyLab: Exceptions This project will contains two template files in zyBooks chapter 12 (and at the end of this

 Topic 12: Exceptions Requirements chapter 12 zyLab: Exceptions This project willcontains two template files in zyBooks chapter 12 (and at the endof this document) Auto.java - a class definition EvaluateAuto.java -contains main) method

Topic 12: Exceptions Requirements chapter 12 zyLab: Exceptions This project will contains two template files in zyBooks chapter 12 (and at the end of this document) Auto.java - a class definition EvaluateAuto.java -contains main) method Use the template files provided to complete the following exercises. And include complete JavaDoc style documentation for both files Each step of the instructions is associated with specific tests, so you can test your program as you go along. Program Requirements An automobile dealership needs to do calculations for their cars, based on the gas tank capacity and average range the car can travel on one tank of gas Write a program to create objects that represent home mortgage loans Test 1 (5 pts): Within the EvaluateAuto class Write code to read an automobile make/model, gas tank capacity and average range the car can drive on one tank from the user, using the prompts as shown below. After reading the both inputs, display a "Both inputs valid integers" message (no error checking required here) Example Enter make and model of car: Honda Accord Enter tank capacity (in whole gallons): 10 Enter average range (in whole miles): 250 Both inputs valid integers Tests 2 through 4 (10 pts, 10 pts,5 pts): Within the EvaluateAuto class: Add an exception handler that includes o A try block around the code that reads the second two user inputs. If no exceptions are automatically thrown, the code will still display the same "Both inputs valid integers" message as befor A catch block to catch the InputMismatchException thrown if the user does not enter an integer for one of the integer inputs . The catch block should display o Error - did not enter a valid integer value

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!