advancedDesign Patterns~55 min
Expression Evaluator (Visitor Pattern)
Build an arithmetic expression tree and learn the Visitor pattern by adding operations to it. You will give nodes an accept method for double dispatch, write an evaluator, add a new node type, then add printing and node-counting visitors — each a new operation with zero changes to the node classes.