the Form Font Family – your choice (readable and not the default) Font Size –15 min 20

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

Create a WPF application named FirstInitialLastNameW3

Your application should include the following in your Window:

Title of Window – Escape the Form

Font Family – your choice (readable and not the default)

Font Size –15 min 20 max (but not too large to fit into controls)

Size – Width 600 – Height - 300

1 Grid with 5 equal columns  (Column 1 and Column 3 are dividers)

          Margin for grid should be 10 on all sides

3 TextBoxes - created in XAML – one in each column centered

All 3 textboxes

  • Horizontal Alignment – Center
  • Vertical Alignment – Center
  • Width/Height – 100/50
  • Name – Descriptive with tbx prefix

3 Labels to identify the 3 textboxes

  • Horizontal Alignment – Center
  • Vertical Alignment – Top
  • Width/Height – 100/50

1 Button

  • Button – created in XAML
    • Name – btnCheck
    • Content – “Check Code”
    • Vertical Alignment – bottom of the middle column
    • Horizontal Alignment - centered
    • Width/Height 100/30

CODE

3 global integer variables

Window_Loaded Event

          Setup a random number variable

          Set each of your global integer variables to a random number between 0 and 9

Display a message box with the title “Instructions” and “Enter a digit 0-9 in each box to guess the code to escape the form”      

btnCheck Click event

  • 3 integer variables
  • Parse the data from all three textboxes and place in the 3 variables
  • Use a series of if/else statements to accomplish the following:
    • If the number entered in the first textbox is equal to the random number generated for the first variable
      • Set the background color of the first textbox to blue
      • Set the IsEnabled property to false.
      • If the number entered in the first textbox is NOT equal to the random number generated for the first variable
        • Clear the first textbox
        • Repeat the above steps for the other two textboxes/random numbers
  • If the user gets all 3 numbers correct there should be a message box letting them know they escaped.  Add an appropriate title and message.
Expert Solution
Step 1

Computer Engineering homework question answer, step 1, image 1

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 6 images

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