Question: Intro to Java Lab 6: Magic 8 Ball Background The Magic 8 Ball is a very popular fortune-telling toy from the 1950s. Users would ask

 Intro to Java Lab 6: Magic 8 Ball Background The Magic8 Ball is a very popular fortune-telling toy from the 1950s. Users

Intro to Java Lab 6: Magic 8 Ball Background The Magic 8 Ball is a very popular fortune-telling toy from the 1950s. Users would ask the all-seeing ball a yeso question and give it a shake. The ball contained dark liquid with a die suspended inside. The die had different answers printed on each side, so after the shake, the ball would give you an 'answer'. SIGNS POINT TO YES Exercise Your job is to complete the Lab6.java file. Do not touch the main method. You will instead create your own method, called getAnswer().getAnswer() should be spelled exactly as it is here. It should take in no arguments and should return a String--one of the outcomes listed below. The main method calls getAnswer(), and the grader will specifically check that you have a method called "getAnswer()"! You need to use Random to randomly generate an index value to select one of the 12 following strings: o It is decidedly so. o Yes - definitely. o Outlook good. o Signs point to yes. o Most likely. o Yes. Reply hazy, try again. O Cannot predict now. o Concentrate and ask again. O Don't count on it. o Concentrate and ask again. O Don't count on it. o My reply is no. o My sources say no. stephen anthony ellis@cloudshell:-/code/lab6$ java Lab6 Welcome to Magic 8 Ball! Ask me a yes or no question: Will the Steelers ever win another Super Bowl? Yes. Would you like to ask another question? yes Ask me a yes or no question: Are you randomly generating these answers? Reply hazy, try again. Would you like to ask another question? yes Ask me a yes or no question: Are you randomly generating these answers? Yes. Would you like to ask another question? no goodbye! stephen_anthony_ellis@cloudshell:-/code/lab6$

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!