Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Date submitted: March 7, 2019 Application title: Simple Calculator Purpose: The simple calculator program will allow to user to enter values for two operands then

Date submitted:
March 7, 2019
Application title:
Simple Calculator
Purpose:
The simple calculator program will allow to user to enter values for two operands then select an arithmetic operation to perform on them. The result of the operation will then be displayed.
Program
Procedures:
Create a Visual Basic Windows Forms application. From a forms window on the screen, the user will click buttons or type from the keyboard to enter two operands into text boxes. The user will then click the appropriate button that corresponds to the operation he/she wants to perform on the operands. The result will be displayed as an equation in a label.
Algorithms,
Processing and
Conditions:
1. The developer will need to provide buttons for each number 0-9 as well as a decimal button to allow numbers with decimals to be entered
2. The developer will need to provide buttons for the following arithmetic operations: addition, subtraction, multiplication and division.
3. A button needs to be provided to enable the user to clear the text boxes and the label that contains the results equation. The focus should then be set to the operand 1 text box.
4. A button needs to be provided that will allow the user to exit the program when clicked.
5. Labels are needed to show the user which textbox corresponds to each operand.
6. The operation will be as follows: operand1 operator operand2 (for example if operand1 is 4 and operand2 is 3 and the subtract operation is selected, the resultant equation that would appear in the label would be: 4 3 = 1)
7. Tab indexes should be provided (in this order) to only the following components: operand1 textbox, operand2 textbox, addition button, subtraction button, multiplication button, division button, clear button, exit button.
8. As numeric buttons are clicked, the active operand textbox should be updated.
9. Option Strict On must be enabled.
Notes and
Restrictions:
The developer can assume that only numbers will be entered into the operand text boxes and that both text boxes will be filled with a number when an operand button is clicked. Also, the developer can assume that a 0 will not be placed in the operand 2 text box when the division operator is chosen.
No If statements (or other decision statements) or loops are allowed with this program.
Comments:
1. For division, limit your result to display a maximum of 2 decimal places.
2. The form should have a Cancel button property enabled to fire the exit buttons event method.
3. All controls and variables must have meaningful names which begin with the prefixes found in Appendix B of your textbook.
4. The source file should have a header comment stating the projects name, purpose, developers name and date the program was started. Also, each major section of code should be commented.
5. Work on the project must be your own and no collaboration with classmates is allowed.

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions