Grokking Design Patterns for Engineers and Managers
Ask Author
Back to course home

0% completed

Visitor Pattern
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

The Visitor pattern is a behavioral design pattern that allows you to add new actions to existing object structures without altering them. It consists of two important components: the items being operated on and the visitors who conduct operations on these elements.

Consider an online shopping platform that offers different discount schemes based on the kind of things bought (e.g., groceries, electronics, or apparel) and the customer status (e.g., new customer, loyal customer, or VIP customer).

Implementing and maintaining these discount strategies directly inside the customer and product cl

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible