You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hint 1
Apply the concept of Polymorphism to get a good design
Hint 2
Implement the Node class using NumericNode and OperatorNode classes.
Hint 3
NumericNode only maintains the value and evaluate returns this value.
Hint 4
OperatorNode Maintains the left and right nodes representing the left and right operands, and the evaluate function applies the operator to them.