Write a program that generates a random number and asks the user to guess what the number is. If the user's guess is higher than the random number,the program should display "Too high, try again." if the user's guess is lower than the random number, the program should display "Too low, try again."
The program should use a loop that repeats until the user correctly guesses the random number. You shall also keep a count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of usersGuesses. Now add another loop to ask the user if he or she wishes to play the usersGuessing game again. If so, the loop should repeat, otherwise it should terminate.
Breaking it down
Class set up
Create method to return random number
Create variables to hold input in program
Create scanner, ask user for input
Call to random number, respond to user's input
Add input validation, verify they are between the range ie - enter a number between MAX_NUMBER < 0?
Allow for a user to choose a different option
If a user guesses a number in < some number, display they won some prize while creating a method named 'getPrize'.
Identify one flow in this program. Hint: placement of random number?