public int calculate(int a, int b,char operator)throws Exception {// throws Exception -> 이 메서드를 호출한 곳에서 오류를 처리해야 한다는 의미 int res = 0; OperatorType type = OperatorType.getOperatorType(operator); switch (type) { case ADD:{ AddOperator add = new AddOperator(a,b); res = add.operator(); break; } case SUB:{ SubtractOperator sub ..