readlearncode.com
Decorator Pattern
The decorator pattern is one of the GoF Structural Pattern and dynamically adds logic to an object. Instead of inheritance, the decorator adds functionality at run time. They introduce a huge amoun…