What is Decorator Design Pattern ?
- Attach additional responsibilities to an object dynamically.Decorators provide a flexible alternative to subclassing for extending functionality.
- Client-specified embellishment of a core object by recursively wrapping it.
- Wrapping a gift, putting it in a box, and wrapping the box.
You want to add behavior or state to individual objects at run-time. Inheritance is not feasible because it is static and applies to an entire class.Why to read, you can just watch the below videos to understand ¬†Decorator Design pattern and its implementations and share your comments ? ¬†