The Visitor Pattern
What is a Visitor Pattern? The Visitor Pattern helps add new capabilities to a composite of objects. Source What problems does it solve? The Visitor Pattern helps solve following problems: Separation of Concerns: The Visitor Pattern separates algorithms from the objects on which they operate. This allows for clean code organization by keeping algorithms and operations separate from the data structures they operate on. Extensibility: It allows you to add new operations to existing object structures without modifying those structures....