Question: Create a class that contains an array of 10 multiple-choice questions to which the user is required to respond with an A, B, or C.
Create a class that contains an array of 10 multiple-choice questions to which the user is required to respond with an A, B, or C. Display an error message if the user enters a character other than A, B, or C. If the user enters nothing—that is, if the user just presses the Enter key without making an entry, catch the thrown Exception, display an error message, and present the same question to the user again. Save the file as QuizWithExceptionHandling.java.
Step by Step Solution
3.48 Rating (151 Votes )
There are 3 Steps involved in it
QuizWithExceptions Caughtjava Multiple choice quiz import javautil public class QuizWithExceptionHan... View full answer
Get step-by-step solutions from verified subject matter experts
