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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started