Class infixModel.StartState
- class StartState
- extends infixModel.ACalcState
State at the start up or after the calculator has been cleared.
No digits or operations input yet.

Singleton
- Singleton instance

StartState
()
- Hidden constructor

enterDigit (InfixCalc, char)
- Appends c to the string of digit collected so far
enterEqual (InfixCalc)
- Performs the pending operation, which may be a no-op, displays the result
and updates the pending op to no-op.
enterOp (InfixCalc, IBinOp)
- Performs the pending operation, and set op as the next pending operation
enterPoint (InfixCalc)
- Enters a "0

Singleton
public static final StartState Singleton = new StartState()
- Singleton instance

StartState
private StartState()
- Hidden constructor

enterDigit
public void enterDigit(InfixCalc calc, char c)
- Appends c to the string of digit collected so far
if c is not "0" which is ignored.
Go to accumulating state.
- Parameters:
- calc - The calculator model (context)
- c - The digit being entered
enterOp
public void enterOp(InfixCalc calc, IBinOp op)
- Performs the pending operation, and set op as the next pending operation
on whatever is computed so far to the operand that will be entered next.
Go to computation state.
Go to error if the number in the display does not parse properly into a floating point number.
Same as accumulating state.
- Parameters:
- calc - The calculator model (context)
- op -
enterEqual
public void enterEqual(InfixCalc calc)
- Does nothing as there is nothing to do yet.
- Parameters:
- calc - The calculator model (context)
enterPoint
public void enterPoint(InfixCalc calc)
- Enters a "0." into the display string.
Go to point state.
- Parameters:
- calc - The calculator model (context)