Question: C# program only You are to write a calculator program which has all 0-9 buttons. the dot button for decimal numbers, the four operands which

C# program only

You are to write a calculator program which has all 0-9 buttons. the dot button for decimal numbers, the four operands which are (+, -, *, /), a clear button and an enter button. The button placements should be similar to the small number pad on the right side of most keyboards.

It should allow the user to keep entering numbers separated by operands and still work. Use the video tutorial from the previous week on Forms to complete this assignment.

I will try to break your program, so make sure it is break-proof.

conditions I will try:

Divide by zero

doing " 9 + - 7" should be evaluated as "9 - 7". " 9 + - * 7" should be "9 * 7". Basically it should do the last operand input. Try on your calculator on the PC to see how it gives you the answer.

"9+3" "enter" gives me 12, then I type "+ 2" "enter" should give 14. If I did not press the first "enter", and instead directly did "9 + 3 +" Right at the moment I press the plus, it did the math for the 9 + 3 and displays 12 on the screen and is waiting for you to enter the 2 next to complete the same problem and get our 14.

should allow decimal numbers... but you cannot place two decimals in a number "27.11.1" does not work because it has 2 decimals. The calculator should not allow me to enter the 2nd decimal.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!