- The calculator only handles calculations with two operands, no more.
- In the display group, the top field holds the first operand, the middle field holds the second operand, and the bottom field holds the answer.
- There is a field "operator" on the left side of the middle display field that holds the operator.
- The number keys are in a group, along with the Clear key and the Rnd key. When a number key is clicked, the label of that key goes after the current operand field.
(What is the most efficient place for this handler?)
- The current operand field is determined by these rules:
- if all the display fields are empty, number key presses go into the top display field.
- if there are numbers in the top display field and an operator in the operator field, number key presses go into the middle display field.
- if the number of characters in the current display field exceeds 12, nothing gets added after the field.
- The C key clears all fields in the display group. (Use a repeat loop to empty out fields 1, 2, 3, and 4 of group "displayGrp".) (Note that in the instructions in the stack this incorrectly referred to only 3 fields in the group. The operator group must also be cleared.)"
- The Rnd key adds a random number from 1 to 9 after the current operand field. (Note that in the instructions in the stack this was incorrectly given as "current operand
group.)"
- Clicking any of the operator keys (+, _, *, /) in the operators group puts the label of that key in the operator field. (What is the most efficient place for this handler?)
- Clicking the equals key in the operators group performs the selected operation on the current operands IF there are two operands present. If one or both operands are missing, the equals key only beeps. (Where do you place the handler to prevent this key from acting just like the other keys in this group?)
|
 |