// the calculator can be in any of these states
public enum CalculatorState {
    DEFAULT,     // reading in numbers but not yet at an operator
    ADDING,      // we entered one number and pushed the + button, now reading the second
    SUBTRACTING, // ditto but for -
    MULTIPLYING, // ditto but for *
    DIVIDING,    // ditto but for /
    DONE         // we have finished a calculation and are displaying the result
}