Question: Define a class ExceptionTest based on class DivideByZeroWithException. Not only should ExceptionTest check for division by zero and valid integer input, but it should also
Define a class ExceptionTest based on class DivideByZeroWithException. Not only should ExceptionTest check for division by zero and valid integer input, but it should also ensure that the integers being input are positive. If they are not, it should throw an InvalidInputException with the message You must enter positive numbers. The program should catch this exception and display an error message.
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
