Question: Magic 8 Ball is a toy developed in the 1950s and used for fortune-telling or advice-seeking. A player asks or thinks of a yes-or-no question
Magic 8 Ball is a toy developed in the 1950s and used for fortune-telling or advice-seeking. A player asks or thinks of a yes-or-no question such as, Will I be rich someday? The player then turns the ball over to see one of 20 randomly chosen responses, for example, It is certain or Very doubtful. Create a program that simulates the toy by allowing a user to type a question; the user then receives one of 20 random responses. Allow the user to keep asking questions until the user types in a sentinel value.
Save the program as Magic8Ball.java.
Step by Step Solution
3.39 Rating (177 Votes )
There are 3 Steps involved in it
import javautil public class Magic8Ball public static void mainString args int nu... View full answer
Get step-by-step solutions from verified subject matter experts
