Please enable JavaScript.
Coggle requires JavaScript to display documents.
Design patterns 2 (Composite (Result - Lets clients treat individual…
Design patterns 2
Composite
Result - Lets clients treat individual objects and composition of objects(Colletctions) same - Tree like structure of objects
Implementation - Interface that implement individual objects and Collections of that objects as well
-
-
Visitor - Represent an operation to be performed on the element of the object structure(Array, List, Tree)
Implementation
-
IAsset - implements Accept(IVisitor visitor) method that accepts Visitor that is going to perform an operation on a IAsset object
Result - Give an object in our object structure some new functionality without changing any objects in that entire structure
Intent - Define a new operation without the changing the classes of the elements on which it operates