This assignment will be to simply create a GUI for, and implement a simple calculator. More than anything else this is an excersize in using the Swing library of Java.
You are to implement a calculator that can perform the following operations:
+, *, /, -, !, and exponentiation ( ^ ).
The calculator is constrained to be a GUI implmentation similar in appearance to the standard windows or xwindows calculator programs. This means that you must have a button for each mathematical operation and single digit number which the user must press to construct a valid number, and a window containing the current answer. You do not need to handle operations which exceed the capacity of an integer (though regardless of whether you do or not, you must display all digits of any number). Optionally, for extra credit, you should check as to whether the operation might cause an overflow.
You will have to handle precedence.
The calculator should, at least, have the following buttons, one for each number that may be used to construct a valid operand, one to present the results of a particular calculation (any unfinished calculations (such as a press of 1 and then multiply and then equals...) should be ignored, a clear button, a button that may be used to construct a positive or negative number, and one button for each operation. If you add functionality, you should include more buttons.
Please be sure your file loads and runs properly on java as installed on the CS machines. Turn it in by running eg
~bap/bin/handin Calculator.javaon a regular UNM CS machine. Though the above indicates one file, if you implement more than one class, you should place each one in a different file, hand in all of these files.
Due: 3:30pm, Nov 30