Abstract classes, Interfaces, and Patterns
- slide 33 : 37
The Visitor design pattern
Visitor
organizes operations on
Composites
which need to traverse the
Component
nodes
The natural object-oriented solution:
One method per operation per
Component
class
The
Visitor
solution
All methods that pertain to a given operation are refactored and encapsulated in its own class