4. Create a class named CalculatorClass and declare a generic delegate named Formula above the name of the class. See sample code below. public delegate T Information(T arg1); 5. Inside the class, declare the generic delegate's variable and set its data type to double. See sample code below. public Information info; 6. After declaring the variable for the generic delegate, create two (2) methods that return the sum and difference based on the following table: Method Name GetSum GetDifference Data Type Double Double 7. Add an event accessor named CalculateEvent with two (2) methods add and remove. Set a message in the console just to confirm if the delegate is added or removed. Example: Console.WriteLine("Added the Delegate");

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

here's the other picture that I needed help with...thank you in advance

 

+
Courses - https://elms.sti.edu/stu X ✔ 01_Laboratory Exercise_2(3).pdf X
C
01_Laboratory Exercise_2(3).pdf
✰ elms.sti.edu/files/3056044/01_Laboratory_Exercise_2(3).pdf?Imsauth=a797cf676bafb742c81099433e6b3c6a3d3487f7
My Questions | bartleby
9.
2 / 3
100% +
01 Laboratory Exercise 2
had an event accessor
in the console just to confirm if the delegate is added or removed.
Example: Console.WriteLine("Added the Delegate");
8. In the frmCalculator class, declare the variable for the CalculatorClass named cal. After declaring,
instantiate it inside the constructor of frmCalculator.
Set the two (2) variables where the data types are double with a variable named num1 and num2.
10. Double click the button to create the method for button event automatically.
frmCalculator
Enter First Number: 35
kurokamiayato - Twitch
Enter Second Number: 10
Answer: 3.5
/
Calculate
+
X
11. Get the value of txtBoxInput1 for num1 and txtBoxInput2 for num2.
Note: You may encounter an error that says, "Cannot implicitly convert type string to double." If this happen
use Convert.ToDouble() to convert the value in the TextBox.
*Property of STI
Page 2 of 3
29°C Cloudy
7:13 PM
9/16/2022
⠀
X
:
D
Transcribed Image Text:+ Courses - https://elms.sti.edu/stu X ✔ 01_Laboratory Exercise_2(3).pdf X C 01_Laboratory Exercise_2(3).pdf ✰ elms.sti.edu/files/3056044/01_Laboratory_Exercise_2(3).pdf?Imsauth=a797cf676bafb742c81099433e6b3c6a3d3487f7 My Questions | bartleby 9. 2 / 3 100% + 01 Laboratory Exercise 2 had an event accessor in the console just to confirm if the delegate is added or removed. Example: Console.WriteLine("Added the Delegate"); 8. In the frmCalculator class, declare the variable for the CalculatorClass named cal. After declaring, instantiate it inside the constructor of frmCalculator. Set the two (2) variables where the data types are double with a variable named num1 and num2. 10. Double click the button to create the method for button event automatically. frmCalculator Enter First Number: 35 kurokamiayato - Twitch Enter Second Number: 10 Answer: 3.5 / Calculate + X 11. Get the value of txtBoxInput1 for num1 and txtBoxInput2 for num2. Note: You may encounter an error that says, "Cannot implicitly convert type string to double." If this happen use Convert.ToDouble() to convert the value in the TextBox. *Property of STI Page 2 of 3 29°C Cloudy 7:13 PM 9/16/2022 ⠀ X : D
+
Courses - https://elms.sti.edu/stu X
C
01_Laboratory Exercise_2(3).pdf
3
01_Laboratory Exercise_2(3).pdf x My Questions | bartleby
✰ elms.sti.edu/files/3056044/01_Laboratory_Exercise_2(3).pdf?Imsauth=a797cf676bafb742c81099433e6b3c6a3d3487f7
W
X
2 / 3
100% + | A
3. In the ComboBox, add the following arithmetic operators.
Arithmetic Operators
5.
kurokamiayato - Twitch
4. Create a class named CalculatorClass and declare a generic delegate named Formula above the
name of the class. See sample code below.
public delegate T Information<T>(T arg1);
Inside the class, declare the generic delegate's variable and set its data type to double. See sample
code below.
public Information<string> info;
6. After declaring the variable for the generic delegate, create two (2) methods that return the sum and
difference based on the following table:
Method Name
GetSum
GetDifference
Double
Double
Data Type
+
7.
Add an event accessor named CalculateEvent with two (2) methods add and remove. Set a message
in the console just to confirm if the delegate is added or removed.
Example: Console.WriteLine("Added the Delegate");
8.
In the frmCalculator class, declare the variable for the CalculatorClass named cal. After declaring,
instantiate it inside the constructor of frmCalculator.
Enter First Number: 35
9.
Set the two (2) variables where the data types are double with a variable named num1 and num2.
10. Double click the button to create the method for button event automatically.
frmCalculator
7
X
29°C Cloudy
* ES
7:10 PM
9/16/2022
⠀
X
:
D
Transcribed Image Text:+ Courses - https://elms.sti.edu/stu X C 01_Laboratory Exercise_2(3).pdf 3 01_Laboratory Exercise_2(3).pdf x My Questions | bartleby ✰ elms.sti.edu/files/3056044/01_Laboratory_Exercise_2(3).pdf?Imsauth=a797cf676bafb742c81099433e6b3c6a3d3487f7 W X 2 / 3 100% + | A 3. In the ComboBox, add the following arithmetic operators. Arithmetic Operators 5. kurokamiayato - Twitch 4. Create a class named CalculatorClass and declare a generic delegate named Formula above the name of the class. See sample code below. public delegate T Information<T>(T arg1); Inside the class, declare the generic delegate's variable and set its data type to double. See sample code below. public Information<string> info; 6. After declaring the variable for the generic delegate, create two (2) methods that return the sum and difference based on the following table: Method Name GetSum GetDifference Double Double Data Type + 7. Add an event accessor named CalculateEvent with two (2) methods add and remove. Set a message in the console just to confirm if the delegate is added or removed. Example: Console.WriteLine("Added the Delegate"); 8. In the frmCalculator class, declare the variable for the CalculatorClass named cal. After declaring, instantiate it inside the constructor of frmCalculator. Enter First Number: 35 9. Set the two (2) variables where the data types are double with a variable named num1 and num2. 10. Double click the button to create the method for button event automatically. frmCalculator 7 X 29°C Cloudy * ES 7:10 PM 9/16/2022 ⠀ X : D
Expert Solution
steps

Step by step

Solved in 3 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