do in any gui programming language

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

do in any gui programming language

  1. Code the Start button to initialize the game. When Start is clicked you need to make the top label and the Start button invisible. You should also clear the contents of the Results label and make it visible, and make label 1 visible. Make the Guess button visible and make it the AcceptButton. Some of this might seem redundant but we want to use this procedure to allow the user to play again so we are programming it to restore all the start up conditions of the program.
  2. Create a Number It should have 1 variable: vNumber which has a normal property declaration. Instead of assigning value to the number variable type in the following code:
    Dim aRandom as new Random
    vNumber = aRandom.Next(1,100)
    This creates a random number between 1 and 100 – the number the user will try to guess. Be sure to initialize this in the btnStart sub by assigning some value to it (theNumber.Number = 5).
  3. In the object create a subroutine called IsEqual with 2 parameters. The first parameter must be Integer data type and the second parameter must be passed ByRef and be of String data type. Use an If .. ElseIf .. Else to assign the three possible states (“ Equal”, “   Less”, “ Greater”) to the string parameter. We are finished the object so declare an object variable back in Form1.
  4. In the Form create an Error Trapping function with boolean data type and 1 parameter of string data type. Test the data passed in to make sure it can be converted to a number and if not display a message to the user. If the number can be converted pass back the value True.
  5. Create a subroutine called Win and place all the code in it which should be executed when the user wins the game. Be sure to tell the user how many guesses they took. This also includes making lblWin visible, making btnGuess invisible, and changing the text value of btnStart to “Play Again” and make this button visible. This way we can use the game setup code we already created to reinitialize the game.
  6. In your btnGuess procedure open an input box to receive the user’s input. Be sure to store this input into a variable or you will lose it! Now call your verification function to make sure the data can be converted to a number. If it is convertable, call the object routine to see if the user guessed correctly. This is the IsEqual sub in your number object. Build the text feedback string and display it in lblOuput. Finally display the Win label if the user has guessed correctly.
Guess the Number
Welcome to Guess the Number. Try to guess a number between 1
and 100. Click the button below to get started.
Start
Exit
programmed by: student name
Transcribed Image Text:Guess the Number Welcome to Guess the Number. Try to guess a number between 1 and 100. Click the button below to get started. Start Exit programmed by: student name
Guess the Number
Welcome to Guess the Number. Try to guess a number between 1
and 100. Click the button below to get started.
Start
Results
Make a Guess
You
Win!
Exit
programmed by: student name
Transcribed Image Text:Guess the Number Welcome to Guess the Number. Try to guess a number between 1 and 100. Click the button below to get started. Start Results Make a Guess You Win! Exit programmed by: student name
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY