Tuesday, November 24, 2020

Decorator design pattern demo in C++

The Decorator is a structural design pattern that allows the adding of new behaviors to an object dynamically by placing those behaviors inside a special wrapper object.

Using decorators you can wrap objects countless number of times since both target objects and decorators follow the same interface. The resulting object will get a stacking behavior of all the wrappers.





No comments:

The Prototype design pattern (A Creational pattern) using C++

The Prototype design pattern is a creational pattern used in software development when the type of objects to create is determined by a pro...