Share
Explore BrainMass

A C# guessing game program with GUI

C#
Creating a random number is not in the book I have. Any help would be most appreciated.

Write a GUI program that is a game to be played by the user. A new employee is working on a classified mission and the program will randomly pick an expected profit to be guessed by the user. The program must randomly select a number within the range of 1 to 900.

Use following steps as a guidance in writing the program.
1. Create a form that displays the rules of the game on a label.
2. Create a textbox for the user to input the guess and also a 'guess' button.
3. If the guess is outside the given range, provide a proper message and allow the user to continue playing.
4. When a user has a valid guess, display a proper message (either too high or too low) and tell the user to guess again, and clear the guess.
5. With a correct guess, display a proper message and change the form's background color to red and disable the guess textbox.
6. Create a `reset' button that allows the user to play another game with a new random number.
7. Create a `show me' button that displays the number and does not generate another random number.
8. Create an `exit' button to exit the program.
9. Ensure that you include error checking to prevent a user guess that is out of the given range and/or contains non-numeric characters.
10. Ensure to provide instruction to the user about how to use the program. Create a menu bar item which contains a `help' function.
11. Create a label that tracks the guess count per game. Each time a new number is generated, start the guess count at 0.

Solution Preview

Please find attached zipped C# project. The Form1.cs is the main ...

Solution Summary

C# project is attached. The program will validate user entry of a number and compare it with a randomly generated number. If the guess is correct a message is displayed and background color changed. Otherwise a proper message is displayed and games continues. The program has comments and release notes in the header of the main file.

$2.19