package exp6; public class OperationFactory { public static Operation createOperate(String operate) { Operation oper = null; switch(operate) { case "+": oper = new OperationAddtion(); break; case "-": oper = new OperationSubtraction(); break; case "*": oper = new OperationMultiplication(); break; case "/": oper = new OperationDivision(); break; } return oper; } }