Question: java file: Output: Thank you! :) Your job is to complete the Lab6.java file. Do not touch the main method. You will instead create your

java file:

Output:

Thank you! :)
Your job is to complete the Lab6.java file. Do not touch the main method. You will instead create your own method, called getAnswer(). The method name 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: - It is decidedly so. - Yes - definitely. - Outlook good. - Signs point to yes. - Most likely. - Yes. - Reply hazy, try again. - Cannot predict now. - Concentrate and ask again. - Don't count on it. - My reply is no. - My sources say no. Qelcome to Magic 8 Ball! Ask me a yes or no question: Wil1 the Steelers ever win another Super Bowl? Yes. Would you 1 ike to ask another question? yes Ask me a yes or no question: Are you randomly generating these answers? Reply hazy, try again. Would you 1ike to ask another question? yes Ask me a yes or no question: Are you randomly generating these answers? Yes. Would you 1 tike to ask another question? no goodbye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
