Question: Modify the driver program from Practice Program 3 in Chapter 8 to use three exception classes called CylinderException, LoadException, and TowingException. The number of cylinders
Modify the driver program from Practice Program 3 in Chapter 8 to use three exception classes called CylinderException, LoadException, and TowingException. The number of cylinders must be an integer from 1 to 12, the load capacity must be a number from 1 to 10 (possibly with a fractional part), and the towing capacity must be a number from 1 to 20 (possibly with a fractional part). Anything other than numbers in these ranges should cause your program to throw and catch the appropriate exception. You also need to define the classes CylinderException, LoadException, and TowingException.
Step by Step Solution
3.38 Rating (164 Votes )
There are 3 Steps involved in it
ANSWER include include include class CylinderException public stdruntimeerror public CylinderExcepti... View full answer
Get step-by-step solutions from verified subject matter experts
