Computer Programming 2 - SY2223 - 2T | 05 Exceptions Handling | Lab Exercise | Java Quiz Bee
Laboratory Exercise | Guessing Game
Instructions:
Create a Java Program;
The program shall:
generate a random number from 1 to 50 for a player to guess;
display a message that indicates whether the player's guess is correct, too low, or too high; and prompt the user to keep on guessing until the correct values is entered. Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following: a number that is out of range (1-50) a letter or any non-numeric character
Prompt the user so that he can guess again if an exception is thrown.
Display the number of total guesses.
Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.
Java Program Code: https://bit.ly/ComProg205HandsOnActivity2JavaQuizBee
Source Article: https://arcania21.wixsite.com/allaboutechnology/labexercsise5bjavaquizbee