Question: Exception Handling This program must be written as a console application. GUI projects will not be accepted. The high-low guessing game. How it works: The

Exception Handling

This program must be written as a console application. GUI projects will not be accepted.

The "high-low" guessing game. How it works: The user attempts to guess a random generated number by the program. If the number is too high, then the program will display "too high." If the number is too low, then the program will display "too low." This will continue until the user correctly guesses the number. Your task for this assignment is to implement a guessing game using exceptions. Implement an exception-handling console application with the following: Program generates random number that the user tries to guess. User enters guess. Program generates tooHigh, tooLow or correct exceptions. You must write custom exception classes for each of these situation (For example: TooHigh.java, TooLow.java) Exception handler throws appropriate exception and a response is issued from the exception class using the getMessage() method. User is allowed to continue guessing and evaluation is repeated until correct guess is made.

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!