Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE I NEED C# PROGRAM Objectives Implement and describe a one window General User Interface (GUI). Implement and understand the interaction between different elements of

PLEASE I NEED C# PROGRAM

Objectives

  • Implement and describe a one window General User Interface (GUI).
  • Implement and understand the interaction between different elements of a GUI.
  • Implement string manipulation.

Background

As humans, we have developed languages in order to effectively communicate with each other. These languages, such as English, are called natural languages. The closer we get to allowing the users of our program to write in their natural language and have our code still interact and work with their intentions, the closer we get to make an easily understandable and intuitive GUI. This goes hand in hand with string manipulation since we will generally store written words as strings.

Tasks

This lab has four parts:

  1. Create a window.
  2. Create two (2) text fields, a clickable button and a label/text object on the window.
  3. Create an event handler for entered text in the text fields.
  4. Create an event handler for the button to add the two text fields and display that in the label/text object.

Task 1 Window

Open a GUI project and create a window. The default code provided with the GUI project will accomplish this, so we will move on to the next topic.

Task 2 Create GUI Elements

Create two text fields, a button and a label and place them on the GUI window. The text fields will be able to take user input and display the text as they write it, similar to the email and password fields on a login page. The button was covered in the previous lab. Finally, the label will act as a piece of text on the window. It is different from the text fields since it cannot be directly written into by the user.

Task 3 The Text Field Event Handlers

The next thing to do is to add the event handlers to the text fields so that after the user writes some text into them and presses enter, we will save the input into the text fields. The process for this will be similar to the button event handler from the last lab.

Task 4 The Button Event Handler

Lastly, we will need to create an event handler for the button that takes the text from both of the text fields and adds them (the user should enter numbers, so this will be addition NOT concatenation) and displays the result of that addition by changing the text of the label to that result.

Some Sample Output:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

Explain the focus of safety programs.

Answered: 1 week ago

Question

Describe the consequences of musculoskeletal disorders.

Answered: 1 week ago