How can I add functionalities to legacy systems without violating the open/closed principle?
What is it?
Behavioural design pattern that allow algorithms and objects that the algorithms operate on to be separated
Benefits
When to use?
New operations need to be added to all elements of an existing object structure
Element
classes must have an accept
function that invokes the visit
function of the Visitor
Visitor