Lab 2: Calculator Assignment
Must be submitted
to Turnin 1/22/06
(Sunday) by 5:59 pm for full
credit
Late Deadline: 1/22/06 (Sunday) by 11:59 pm for 10% off.
This assignment
is to be completed Individually.
You may help each
other with the software, but not with the code.
|
|
Build a Calculator Form that looks like this:
General Requirements:
- When you
click on a button, the number/symbol should appear in the text box.
- When
you click on the button “=”, the text box should be replaced by the value
calculated.
- If you
then click on another symbol, and then another number, the calculator should
be able to continue processing.
- When
you click CLEAR, the text box should empty, and all previously calculated
numbers be forgotten.
- Error
messages should appear when a user does something illegal, like divides by
zero, or clicks: “1” “+” “=”. The error message should
clear the calculator, and let the user start over.
- The
calculator must do correct math, and needs to handle decimal points and
negative values.
- The
calculator does NOT need to function from values typed into the text box.
Design Requirements:
- The
math functions should be implemented using Delegates, so that the program
may be easily modified in the future to handle other functions.
- Use
event handlers for error messages.
Turnin Notes:
[username]_Lab2.sln
folder:
calculator ß if
this is not the name of the folder, that is ok.