Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8. ESP.java: challenges 19, p266. Note that all colors should be handled by using their numeric identity. This is a number problem, not a String

image text in transcribed

8. ESP.java: challenges 19, p266. Note that all colors should be handled by using their numeric identity. This is a number problem, not a String problem! : 19. ESP Game Write a program that tests your ESP (extrasensory perception). The program should ran- domly select the name of a color from the following list of words: Red, Green, Blue, Orange, Yellow To select a word, the program can generate a random number. For example, if the number is 0, the selected word is Red, if the number is 1, the selected word is Green, and so forth. Next, the program should ask the user to enter the color that the computer has selected. After the user has entered his or her guess, the program should display the name of the randomly selected color. The program should repeat this 10 times and then display the number of times the user correctly guessed the selected color

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

What is her relationship to you, both by position and inclination?

Answered: 1 week ago

Question

8. Providing support during instruction.

Answered: 1 week ago