public override void addOpperator(Calc calc, IBinOp op) { calc.Total=Complex.Parse(calc.getDisplay()); calc.pending_op = op; calc.setDisplay(""); calc.CurrentState = OpperatorEntredState.Singleton; }
public override void addOpperator(Calc calc, IBinOp op) { calc.pending_op = op; calc.setDisplay(""); calc.CurrentState = OpperatorEntredState.Singleton; //calc.CurrentState=ErrorState.Singleton; //throw new Exception("cant add opperator in opperator entered state"); }
public override void addOpperator(Calc calc, IBinOp op) { //calc.Opperand1=calc.Total; calc.pending_op=op; calc.CurrentState=OpperatorEntredState.Singleton; }
public abstract void addOpperator(Calc calc, IBinOp op);
public override void addOpperator(Calc calc, IBinOp op) { calc.CurrentState=ErrorState.Singleton; throw new Exception("cant add opperator in opperator entered state"); }
public override void addOpperator(Calc calc, IBinOp op) { calc.CurrentState = ErrorState.Singleton; //throw new Exception ("cannot add opperator when an opperand has not been entered yet!"); }