CAPP 305
Assignment 2
Due: 14 Sept

Make another calculator program. It looks like the image below. It behaves like the Calc2.exe at the class web site.

Hints: have a global variable that stores the value of the first number (or previous result). Have another variable that records which operation button was pressed (and thus will indicate which operation to perform after the second number and the = button have been pressed).
Build the program one step at a time; the entire thing need not and should not be done at once. I suggest getting manual entry of a number into the text box, clicking Add button, then the next number manually entered and then the = button working first. Then add the other operation buttons (they will have the same code as the Add button). Then add the digit buttons, or maybe the +/-, or maybe the ., or maybe the Clear. Error detection can be added somewhere along the way.