The Visitor Pattern

If elements in a container have the ability to accept visitors, then new operations on a container full of elements can be defined later.

Question: Since ConcreteElementA and ConcreteElementB both implement accept in the same way, why not push this implementation into the Element superclass?