Question
Write a program that plays guess the number as follows: Your program chooses the number to be guessed by selecting an Integer at random in
Write a program that plays guess the number as follows: Your program chooses the number to be guessed by selecting an Integer at random in the range 11000. The program then displays the following text in a label: I have a number between 1 and 1000--can you guess my number? Please enter your first guess.
A TextBox should be used to input the guess. As each guess is input, the background color should change to red or blue. Red indicates that the user is getting warmer, blue that the user is getting colder. A Label should display either TooHigh or TooLow, to help the user zero in on the correct answer. When the user guesses the correct answer, display Correct! in a message box, change the Forms background color to green and disable the TextBox. Provide a Button that allows the user to play the game again. When the Button is clicked, generate a new random number, change the background to the default color and enable the TextBox. You also need to add a ListBox that contains all the guessed numbers by the users. After user guesses the right number, you need to clear the entries of ListBox. Provide two radio buttons that can sort the listed numbers of ListBox in ascending or descending order.
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