Skip to content

Latest commit

 

History

History

Decorator

#Decorator Pattern

The Decorator Pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionatily.

Design Principles:

  1. Classes should be open for extension but closed for modification.