Question: Write a Java program that: 1. Asks how many users will be playing (1-n). Check. that the number given is a whole number and is

Write a Java program that:

1. Asks how many users will be playing (1-n). Check. that the number given is a whole number and is not a negative value.

2. Chooses a random number for each player

3. Asks each player (one guess per round) to enter their guess

4. Alert the user with Too High, Too Low, CORRECT!

5. Record the answer for each user, if incorrect in an array.

6. If the user was correct, skip them in subsequent rounds until the rest of the players guess correctly.

7. Once all players have guessed their correct number, print out the number of guesses it took for each one to guess correctly, the incorrect responses, and show a ranking of the players. The player who took the least number of guesses, wins.

8. Ask if the user(s) wish to play again. If so, reset all values.

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!