Question
C# Program Homework 5 You are to write a calculator program which has all 0-9 buttons. the dot button for decimal numbers, the four operands
C# Program
Homework 5 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.
http://www.youtube.com/watch?v=qfH6Y7p4J7U
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started