Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program #1 (13 points): Design and implement a Java class (name it MismatchException) to determine the average of three integer numbers. The program must include

Program #1 (13 points): 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago