Hello, this is my lab 2 exercise.
You can use it for simple calculating :)
Hope you will like it......
Level: Easy
Time: 6 hours
You can use it for simple calculating :)
Hope you will like it......
Level: Easy
Time: 6 hours
Requirements:
__________/100
- Implement a mathematical calculator similar with a scientific
calculator with the following requirements:
- The application is a control box
- No minimizing and maximizing buttons
- Use containers (group boxes and panels)
- Create your icon (use Visual Studio or the editor of your choice to
create the icon)
- “On” button starts the calculator.
- The calculator performs minimum four operations: addition,
subtraction, multiplication and division.
g. If you enter a number by mistake, you can
use CE to clear only the current operand. It does not clear previous
calculations. C deletes all.
Backspace deletes the last digit.
- Don’t store the operations and numbers in a string/array! Use events,
the SendKeys class to get the keys and the operators values or use
the Sender and the same handler for several keys.
- Create a picture box that will load an image or paint a rectangle.
- Add the image as a resource.
- Identify what exceptions are needed and add them to your code.
- Test your calculator on a different resolution
- Use good
programming style:
- Comments
- Meaningful naming
- Bloc descriptors for classes and procedures: use XML comments
- Mark
the assemblies as CLS-Compliant.
Bonus:
__________/25
a.
Implement memory functions to
solve brackets and order of operations.
b. For some calculations, you may want to
remember one calculation to use later. You can add a calculation into memory by
clicking the M+ button. Then you recall it later with the MR
button. You clear the memory with the MC button.
c. Note that M+ will add whatever you
have on the display to whatever is already in the memory, so it is good to
click MC before adding with M+, unless you have recently started
the calculator.
d. The MS button stores
the currently displayed result in memory. In the case when you display only the
most recent operand, MS and M+ serve the same function.
Example: You want to add 1 + 2 and then multiply that by the
sum of 9 - 2
Click C to clear all.
Add 1 + 2 and click =
Click MC to clear the memory, then
click M+ to add the value to memory.
Click CE to clear previous addition.
Then enter 9 - 2 =
Click * to multiply by another number.
Click MR to recall what is in memory.
Then click =
You should get a total of 21.
No Response to "Simple Calculator Windows Form C#"
Post a Comment