Question: Due Monday by 6pm Points 7 Submitting a text entry box or a file upload Assignment 9: Exception Handling Create an Exception class called BadGuessException

 Due Monday by 6pm Points 7 Submitting a text entry box

Due Monday by 6pm Points 7 Submitting a text entry box or a file upload Assignment 9: Exception Handling Create an Exception class called BadGuessException BadGuessException should be a sub-class of the Exception class [1 point] Create 2 constructors [1 point] . A default constructor in the BadGuessException class, that passes the message-Sorry, that was an invalid guess!" to the parent constructor using keyword super. A parameterized constructor in the BadGuessException class that will pass the parameter to the parent constructor using keyword super Create a class called GuessingGame - Generate a random number between 1 and 10 - Prompt the user to guess the number. Allow the user unlimited attempts to guess the number correctly. [1 point) : Once the user guesses the number correctly, print out "YOU GOT IT: and print out how many tries it took the user to guess the number. I1 point) - Using a try catch block, add exception handling to your code. 12 points) throw a BadGuessException if the user enters any number that is not between 1 and 10 Add another catch block to catch the exception thrown if the user enters an incorrect format for number they suessed. such as "five" or "5.0". This should prevent your program from crashing or throwing a run time excpetion. When this exception is caught the program should not crash and should display Sorry you entered an invalid number format [1 point) Submission Due on Thursday. December Ai at 6:00 PM

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!