Develop an app that generates a random number and prompts the user to guess the number. When the user clicks the New Game Button, the app chooses a number in the range 1 to 100 at random. The user enters guesses into the Guess: TextBox and clicks the Enter Button. If the guess is correct, the game ends, and the user can start a new game. If the guess is not correct, the app should indicate whether the guess is higher or lower than the correct number. Use instance variables for a Random object and to store the randomly generated number in the range of 1 to 100. If a guess is correct, display Correct! in the output Label, then disable the Enter Button and enable the New Game Button. If a guess is higher than the correct answer, display Too high… in the output Label. If a guess is lower than the correct answer, display Too low… in the output Label. For the user’s convenience, give the Guess: TextBox the focus after each guess is processed.

New Download