Question: 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

 8. ESP.java: challenges 19, p266. Note that all colors should be

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

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!