What is visitor pattern? 1. It encapsulates an operation executed on an object hierarchy in an object. That says, it allows to add methods to classes of different types without much altering to those classes. 2. Enables to define new operations without changing the object hierarchy. Use-Case: a. Operations shall be performed on object hierarchy b. The operations change frequently but object hierarchy is stable. Basic UML Class Diagram: Visitor: · Defines the visit operation on the object structure Tax Visitor: · Implements the visit operation for each type of object Visitable: · Defines the accept operation which takes visitor as an argument Visitable Element(s): · Implements accept operations ...