Suppose there is an ENUM
enum Operations {
ADD,
SUBTRACT,
MULTIPLY
}
I want to use this enum to add two numbers(say 5 and 3) and get the output as 8
or
I want to use this enum to subtract two numbers(say 9 and 3) and get the output as 6
Question:
- is this possible?
- if yes than what are the modifications to be done to this enum?
enums can have abstract methods, and each member can implement it differently.will allow you to do