I have four classes for handling math operations: Plus
, Multiply
, Divide
, Minus
my input is like this:
1, 2, +
Now my question is this : How can we determine the type of operator then call the correct class?(implement without if-else or switch-case)
See Question&Answers more detail:os