A program to meet this spec, but for CLI php. Don't go digging too much if you ain't done you homework yet!
Develop and test a Java program that will allow the user to guess a number randomly generated by the computer (see below for random number generator info). Your program must perform the following functions:
-
Randomly pick a number to be guessed (range between 1 and 100).
-
Allow the user to guess the number.
-
Inform the user if they have guessed too high, too low, or correctly.
-
The user should be allowed to continue guessing until they guess correctly.
-
Count the number of guesses taken by the user to guess the correct answer.
-
Inform the user of the number of guesses once the number is guessed correctly.
-
Allow the user to play another game (with a new random number).
-
Inform the user of the average number of guesses for all games played.
Bonus 1: Allow the user to give up on any game, but be allowed to play another game. Bonus 2: Add a colder/warmer option based on how far away the user’s guess is from the actual number.
- Complete
- Complete
- Complete
- Complete
- Complete
- Complete
- Complete
- Complete
Bonus 1: Complete (asks every 5 guesses) Bonus 2: Complete