subject

Write a program that simulates a Magic 8 Ball, which is a fortune-telling toy that displays a random response to a yes or no question. In the student sample programs for this book, you will find a text file named 8_ball_responses. txt. The file contains 12 responses, such as "I donât think so," "Yes, of course!," "Iâm not sure," and so forth. The program should read the responses from the file into an array or ArrayList object. It should prompt the user to ask a question, and then display one of the responses, randomly selected from the array or ArrayList object. The program should repeat until the user is ready to quit. You will need to create two .java files for this assignment: a Magic 8 Ball Class and a Demo class. All methods should be documented with javadoc style comments. Contents of 8_ball_responses. txt: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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
You know the right answer?
Write a program that simulates a Magic 8 Ball, which is a fortune-telling toy that displays a random...
Questions
question
Mathematics, 12.11.2020 22:40
question
Mathematics, 12.11.2020 22:40
Questions on the website: 13722367