public static Operation CreateOperation(string oper) { Operation operation = null; switch (oper) { case "+": operation = new OperationAdd(); break; case "-": operation = new OperationSub(); break; case "*": operation = new OperationMult(); break; case "/": operation = new OperationDivision(); break; default: break; } return(operation); }
public static Operation createOperate(string operate) { Operation oper = null; switch (operate) { case "+": oper = new OperationAdd(); break; case "-": oper = new OperationSub(); break; case "*": oper = new OperationMul(); break; case "/": oper = new OperationDiv(); break; default: break; } return(oper); }
public static Operation CreateOperate(string type) { Operation oper = null; switch (type) { case "+": oper = new OperationAdd(); break; case "-": oper = new OperationSub(); break; default: break; } return(oper); }