Question: You created an interactive RentalDemo class that obtains all the data for four rentals from Sammys Seashore Rentals, including details about the contract number, length
You created an interactive RentalDemo class that obtains all the data for four rentals from Sammy’s Seashore Rentals, including details about the contract number, length of the rental, and equipment type. Now, modify the class so that it becomes immune to user data entry errors by handling exceptions for each numeric entry. Each time the program requires numeric data—for example, for the rental period—continuously prompt the user until the data entered is the correct type.
Save the revised program as RentalDemo.java.
Step by Step Solution
3.38 Rating (164 Votes )
There are 3 Steps involved in it
class Rental public static final int MINUTESINHOUR 60 public static final int HOURRATE 40 public static final int CONTRACTNUMLENGTH 4 Equipment equipment private String contractNumber private int hour... View full answer
Get step-by-step solutions from verified subject matter experts
