Dekorator
Dekorator is a design pattern used in software engineering. It allows behavior to be added to an individual object dynamically and transparently, without affecting the behavior of other objects that share the same class. This is achieved by creating a set of wrapper classes, each of which adds a specific piece of functionality.
The Dekorator pattern is a structural pattern that provides an alternative to subclassing for extending functionality.
Key components of the Dekorator pattern include the Component interface, which defines the common interface for
This pattern is useful when you need to add responsibilities to individual objects, dynamically and without