Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# Class Exercise 2 The purpose of this exercise is to: - Declare memory locations for data - Learn about the various data type -

C#
image text in transcribed
image text in transcribed
image text in transcribed
Class Exercise 2 The purpose of this exercise is to: - Declare memory locations for data - Learn about the various data type - Declare and manipulate strings - Implement casting Creating the GUI 1. Open Visual Studio and create a new application MathOperations(1) 2. Familiarise yourself with the visual studio environment 3. Change the name of forml to Mathematica. (1) Right-click on the form in the solution explorer Select Rename Type in the new name 4. Drag the following controls on the form (see the GUI) a. A group box to organise your work. Use a GroupBox to group a collection of controls on a form logically. The group box is a container control that can define groups of controls. Change the font size to 12 . Include the following within this group box: i. Labels for the numbers - font size to 10 ii. Text boxes for the numbers - font size to 10 b. A groubox for the operations: Add, Minus, Multiplication and Division. Use Radiobuttons for each of these options within the group box. c. An Answer label d. A read-only txtAnswer textbox to display the answer. Change the Readonly property of this control to true. 6. The coding section appears. a. The namespace for this program is b. The name of the class for this program is 7. Include comments in the program that states the purpose of the program. For example, this program uses mathematical operations to add, subtract, multiply and divide numbers. 8. Declare two variables at the form level, as seen in figure 1. a. What is a variable? (1) b. What is the data type of the declared variables in figure 1 ? What is the purpose of declaring the data type? 9. Double-click on the Add Radio button for coding. a. Firstly, write the statement that will obtain the data from the user, cast it and assign it to the variable declared earlier. b. Do the addition calculation. 10. Double-click on the Minus Radio button for coding. a. Firstly, write the statement that will obtain the data from the user, cast it and assign it to the variable declared earlier. b. Do the subtraction calculation. D mat Figure 1: Maths Operations program 11. Execute the program to ensure there are no errors. 12. Complete the program by adding other mathematicawoperations: Multiplication and Division. 13. Add a button that clears the textboxes using a (lear() method from the Textbox class. 14. Do you think this is the best and most efficient way of implementing the Mathematica program? How can the program be improved? Class Exercise 2 The purpose of this exercise is to: - Declare memory locations for data - Learn about the various data type - Declare and manipulate strings - Implement casting Creating the GUI 1. Open Visual Studio and create a new application MathOperations(1) 2. Familiarise yourself with the visual studio environment 3. Change the name of forml to Mathematica. (1) Right-click on the form in the solution explorer Select Rename Type in the new name 4. Drag the following controls on the form (see the GUI) a. A group box to organise your work. Use a GroupBox to group a collection of controls on a form logically. The group box is a container control that can define groups of controls. Change the font size to 12 . Include the following within this group box: i. Labels for the numbers - font size to 10 ii. Text boxes for the numbers - font size to 10 b. A groubox for the operations: Add, Minus, Multiplication and Division. Use Radiobuttons for each of these options within the group box. c. An Answer label d. A read-only txtAnswer textbox to display the answer. Change the Readonly property of this control to true. 6. The coding section appears. a. The namespace for this program is b. The name of the class for this program is 7. Include comments in the program that states the purpose of the program. For example, this program uses mathematical operations to add, subtract, multiply and divide numbers. 8. Declare two variables at the form level, as seen in figure 1. a. What is a variable? (1) b. What is the data type of the declared variables in figure 1 ? What is the purpose of declaring the data type? 9. Double-click on the Add Radio button for coding. a. Firstly, write the statement that will obtain the data from the user, cast it and assign it to the variable declared earlier. b. Do the addition calculation. 10. Double-click on the Minus Radio button for coding. a. Firstly, write the statement that will obtain the data from the user, cast it and assign it to the variable declared earlier. b. Do the subtraction calculation. D mat Figure 1: Maths Operations program 11. Execute the program to ensure there are no errors. 12. Complete the program by adding other mathematicawoperations: Multiplication and Division. 13. Add a button that clears the textboxes using a (lear() method from the Textbox class. 14. Do you think this is the best and most efficient way of implementing the Mathematica program? How can the program be improved

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Express 67.3 km/h in meters/second.

Answered: 1 week ago