Question: In JAVA please re-do the Magic8Ball program from BA5. The program should generally work the same as it did in BA5, but updated to include

In JAVA please re-do the Magic8Ball program from BA5. The program should generally work the same as it did in BA5, but updated to include these items:

Create a method called get8BallAnswers (2 point)

The method should have no parameters

The method will build the array of possible String answers (from BA5), and return the entire array

Overload the get8BallAnswers method (2 points)

The method should have 1 integer parameter, where the user can pass a random number to it

The method should return 1 possible String answer from the array. Hint: You can use the method you created in step 2 to retrieve the array of answers.

Create a method called magic8Ball that will basically run the whole program. (2 point)

It should ask the user to enter a question for the 8 Ball, generate a random number, and pass that to one of the methods above to get a response.

You will call this magic8Ball method in the main method.

The method should be called within the do-while loop, and repeat if the user wants to run the program again or not.

The array should have these 12 reponsess

Yes, of course!

Without a doubt, yes.

You can count on it.

For sure!

Ask me later.

I'm not sure.

I can't tell you right now.

I'll tell you after my nap.

No way!

I don't think so.

Without a doubt, no.

The answer is clearly No.

Thank you very much!

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!