Visitor Design Pattern

Learn how to implement the Visitor design pattern in Kotlin.

We'll cover the following...

The Visitor design pattern is usually a close friend of the Composite design pattern. It can either extract data from a complex tree-like structure or add behavior to each node of the tree, much like the Decorator design pattern does for a single object.

Now, let’s sat the software architect from the previous example has made a plan to get the workers do the work, so that they just have to manage them. Their request-answering system from the Chain of Responsibility lesson worked quite well, but they are afraid some developers have begun to suspect that they’re a bit of a fraud. To confuse them, they plan to produce weekly emails with links ...