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

  Use the best-response approach to find all nash equilibria

Player 1 has the following set of strategies {A1;A2;A3;A4}; player 2’s set of strategies are {B1;B2;B3;B4}. Use the best-response approach to find all Nash equilibria.

  A supplier and a buyer, who are both risk neutral

A supplier and a buyer, who are both risk neutral, play the following game,  The buyer’s payoff is q^'-s^', and the supplier’s payoff is s^'-C(q^'), where C() is a strictly convex cost function with C(0)=C’(0)=0. These payoffs are commonly known.

  Pertaining to the matrix game theory problem

Pertaining to the matrix need simple and short answers, Find  (a) the strategies of the firm (b) where will the firm end up in the matrix equilibrium (c) whether the firm face the prisoner’s dilemma.

  Nash equilibria

Consider the two-period repeated game in which this stage game is played twice and the repeated-game payo s are simply the sum of the payo s in each of the two periods.

  Find the nash equilibrium

Two players, Ben and Diana, can choose strategy X or Y. If both Ben and Diana choose strategy X, every earns a payoff of $1000.

  Construct the payoff matrix for the game

The market for olive oil in new York City is controlled by 2-families, Sopranos and Contraltos. Both families will ruthlessly eliminate any other family that attempts to enter New York City olive oil market.

  Question about nash equilibrium

Following is a payoff matrix for Intel and AMD. In each cell, 1st number refers to AMD's profit, while second is Intel's.

  Finding the nash equilibrium

Determine the solution to the given advertising decision game between Coke and Pepsi, assuming the companies act independently.

  Nash equilibria to determine the best strategy

Little Kona is a small coffee corporation that is planning entering a market dominated through Big Brew. Each corporation's profit depends on whether Little Kona enters and whether Big Brew sets a high price or a low price.

  Creating a payoff table

Suppose you and your classmate are assigned a project on which you will earn one combined grade. You each wish to receive a good grade, but you also want to avoid hard work.

  Determine the nash equilibrium for trade policy

Consider trade relations in the United State and Mexico. Suppose that leaders of two countries believe the payoffs to alternative trade policies are as follows:

  Find the nash equilibrium outcomes

Use the given payoff matrix for a simultaneous move one shot game to answer the accompanying questions.

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