Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Classify delivery styles by type.

Answered: 1 week ago