Decorator design pattern
Definition : Decorator design pattern attaches additional responsibilities to an object dynamically. Decorator provides a flexible alternative to subclassing for extending functionality.
Lets understand this with help of an example :
Suppose you hav...
nikhilchandrakar.hashnode.dev2 min read