Пример #1
0
 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");
 }
Пример #3
0
 public override void addOpperator(Calc calc, IBinOp op)
 {
     //calc.Opperand1=calc.Total;
     calc.pending_op=op;
     calc.CurrentState=OpperatorEntredState.Singleton;
 }
Пример #4
0
 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");
 }
Пример #6
0
 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!");
 }