Write a windows form program to guess list of random no

Assignment Help Game Theory
Reference no: EM13944945

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: https://www.dotnetperls.com/random https://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 <random number + 3>"

Else set the second label text to "It's not <random number - 1>"

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: <random number>" 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.

Reference no: EM13944945

Questions Cloud

What will dividend yield and capital gains yield be in year : Suppose a company has net income of $1,000,000 and a plowback ratio of 40%. there are 50,000 shares of stock outstanding. the company plans to increase dividends by 22% each year for the next 2 years and then apply a 2.25% growth rate to dividends ea..
Securities are generally sold in the primary markets : Securities are generally sold in the primary markets with the help of a ___ serving as a a _____
Could russian operations be in response more to a perceived : As for Ukraine, could Russian operations be in response more to a perceived threat from NATO than the need to obtain resources? Crimea is a nice prize for Russia, but are there larger issues such as NATO attempting to gain influence in states surr..
What are the capital gains yield and dividend yield : We have a common stock which has a dividend which grows at 100%for the first 1 year and 200% for the next 1 year. After that it rises more reasonably, but we only know it indirectly. Net profit margin, ATO and financial leverage are .02, 3 and 2 resp..
Write a windows form program to guess list of random no : The form will have a textbox in which the user will enter an integer number to match against the next number in the array.
Cash balance be replenished : The Smythe firm expects a total cash need of $9,000 over the next 4 months. They have a beginning cash balance of $1,000, and cash is replenished when it hits zero. The fixed cost of selling securities to replenish cash balances is $4.00. how many ti..
What is the horizon value to the nearest million : A company forecasts free cash flow of $40 million in three years. If the weighted average cost of capital is 10 percent and the cost of equity is 15 percent, what is the horizon value, to the nearest million
Optimizing customer demand for the product : Read the case study presented, open the data file embedded on slide 6, including all worksheets. Use DMAIC methodology to analyze data and recommend directional improvements to optimize customer demand for this product.
Which car will she buy in order to maximize her utility : The BMW that she wants sells for $37,220, while the Mitsubishi sells for $28,200. She can afford either car. Which car will she buy in order to maximize her utility?

Reviews

Write a Review

Game Theory Questions & Answers

  What is the subgame perfect pricing policy for tony

What is the subgame perfect pricing policy for Tony - Please make sure you write down the strategies for all players and show why it is subgame perfect

  How would you know how to store the letters

Have the random generator generate an "unused" letter, then STORE that letter into a global array/vector, etc.

  Question from the given payroll matrix where the payoff

question from the given payroll matrix where the payoff refer to profit that firm a and b earn from their possible

  Hypothetical data demonstrate the relationship

The following hypothetical data demonstrate the relationship. The dependent variable is a measure of language skill at age 3 for each child. Do the data indicate any significant differences? Test with α=0.05.

  Absences can affect productivity

Employee absences can seriously affect productivity. In one country, employees are absent from work an average of 2.6 weeks of the 52-week work-year.

  Significance level using the critical value approach

At a 0.025 significance level using the critical value approach, test to see if the % error is higher than the industry standard. Clearly state your hypothesis and conclusions.

  Problem related to game theory

Assume that the market for computer chips is dominated through two comapnies: Intel and AMD. Intel has discovered how to make superior chips and is planning whether or not to adopt new technology.

  Find all nash equilibria in pure strategies in given games

Find all Nash equilibria in pure strategies in the following non-zero-sum games. Describe the steps that you used in finding the equilibria.

  Is a nash equilibrium in which more than k people contribute

Is there a Nash equilibrium in which more than k people contribute? One in which k people contribute? One in which fewer than k people contribute?

  Density curve describing the distribution

In order to answer the following questions, first draw a density curve describing this distribution. Pay attention to the height of the curve!

  Confidence interval for the mean life of new type of bulb

A manufacturer of a new, less expensive type of light bulb claims that this product is very well made and even more reliable than the higher priced competitive light bulbs.

  Show that army can increase its subgame perfect equilibrium

Show that army 2 can increase its subgame perfect equilibrium payoff (and reduce army 1's payoff) by burning the bridge to its mainland, eliminating its option to retreat if attacked.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd