Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Extra 6-1 Create a simple calculator In this exercise, you'l1 create a form that accepts two operands and an operator from the user and then

Extra 6-1 Create a simple calculator In this exercise, you'l1 create a form that accepts two operands and an operator from the user and then performs the requested operation. Simple Calculator Operand 1: 86 Operator Operand 2 11.11 Resut 7.7408 1. Start a new project named SimpleCalculator in the Extra Exercises Chapter 06SimpleCalculator directory 2. Add labels, text boxes, and buttons to the default form and set the properties of the form and its controls so they appear as shown above. When the user presses the Enter key, the Click event of the Calculate button should fire. When the user presses the Esc key, the Click event of the Exit button should fire 3. Code a private method named Calculate that performs the requested operatiorn and returns a decimal value. This method should accept the following arguments Description Argument decimal operandi string operatorl decimal operand2 The value entered for the first operand. One of these four operators: +, -, *, or / The value entered for the second operand. 4. Create an event handler for the Click event of the Calculate button. This event handler should get the two numbers and operand the user enters, call the Calculate method to get the result of the calculation, display the result rounded to four decimal places, and move the focus to the Operand 1 text box. Create an event handler for the Click event of the Exit button that closes the form Create an event handler that clears the Result text box if the user changes the text in any of the other text boxes Test the application to be sure it works correctly 5. 6. 7.

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

The Core Ios Developer S Cookbook Core Recipes For Programmers

Authors: Erica Sadun ,Rich Wardwell

5th Edition

0321948106, 978-0321948106

More Books

Students also viewed these Programming questions

Question

How do SSAE 16 Type 1 and Type 2 differ?

Answered: 1 week ago

Question

Use implicit differentiation to find dy/dx. x + y +3

Answered: 1 week ago