Question: Java Make a class called Favorite_Class that presents the user with a choice of 3 Classes to choose which is there favorite. Use a switch
Java
Make a class called Favorite_Class that presents the user with a choice of 3 Classes to choose which is there favorite. Use a switch block to produce different outputs based on their input. The question is:
What is your favorite class?
A) History class
B) Chemistry class
C) Math class
If the user inputs A, output: "That is very interesting" as well as output a random number (between 1 and 20) of the symbol -. If the user answers B, output: "That's my favorite as well". If the user answers C, output "That's my worst". If the user enters a letter out of range, output "You didn't answer the question." . The user should be able to answer with a capital or lowercase letter.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
