Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Game Theory Expert

Write a Windows Form program to guess against a list of randomly generated numbers.

Create a Form, name it GuessANumber and create a randomly generated array containing 100 integer numbers. See examples for random number generation at the following sites: http://www.dotnetperls.com/random http://www.c-sharpcorner.com/UploadFile/mahesh/RandomNumber11232005010428AM/RandomNumber.aspx

The random number generation for the array will be done in a method both when the array is first populated and when the array needs to be repopulated (requirement 10).

The form will have a textbox in which the user will enter an integer number to match against the next number in the array.

The form will have three buttons labeled Guess, Next Guess (disabled at startup), and Exit GuessANumber.

The form will have a label that contains the text "Place your mouse here for a hint" that will generate a hint about the hidden number when the mouse is passed over the label which will be displayed in a second label as follows:

If the current random number in the array is greater than 3 and less than 96 set the second label text to "It's not "

Else set the second label text to "It's not "

Starting with position 0 in each array ask the user to guess the number currently selected from the array, enter it in the textbox and click the Guess button. The number for each guess will be selected from the array in the index order (0 - 99).

When the Guess button is clicked:

The Guess button will be disabled.

The Next Guess button will be enabled.

A label will display a "You Win" message if the number entered in the textbox matches the number from the array or "Sorry - You Lose; the number is: " if the number does not match the number from the array.

If the numbers match add one to an accumulating correct guess counter and display the number of correct guesses made.

If the numbers do not match, add one to an accumulating incorrect guess counter and display the number of incorrect guesses made.

Disable the hint label.

Set the array index to the next number in the array.

When the Next Guess button is clicked:

The Next Guess button will be disabled.

The Guess button will be enabled.

The win/lose message label will be cleared of text.

The hint label will be enabled.

When the user clicks the Next Guess button, the user can then make another guess and the program will use the next array number from the array.

If the user makes more than 100 guesses, the program should use the randomization method to repopulate the random numbers in the array and reset the array subscript to 0 so the guessing can start over, but continue the running totals.

When the user clicks the Exit GuessANumber button the application will close.

Internal Documentation.

Game Theory, Economics

  • Category:- Game Theory
  • Reference No.:- M91615808
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Game Theory

In this assessment task you will take the role of an expert

In this assessment task you will take the role of an expert economist, employed by a government department or regulatory authority. Decision-makers in government rely on the advice of experts, like you, when formulating ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As