Question: Design and implement a Java class (name it MismatchException) to determine the average of three integer numbers. The program must include a try-and-catch exception handling

Design and implement a Java class (name it MismatchException) to determine the average of three integer numbers. The program must include a try-and-catch exception handling block to detected invalid inputs (InputMismatchException). If an invalid input value is detected, the program prompts the user to re-enter valid numbers. The program does not proceed until valid integer values were entered. The following are sample runs to illustrate required output formatting. Enter three integers: 1 2 3 Numbers: 1, 2, 3 Average: 2.00 Enter three integers: 1 2 3.5 Incorrect input, re-enter three integers: 1 2.5 3 Incorrect input, re-enter three integers: 1 x false Incorrect input, re-enter three integers: a b c Incorrect input, re-enter three integers: John Ed 3 Incorrect input, re-enter three integers: 1 2 3 Numbers: 1, 2, 3 Average: 2.00

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!