implemented decorator pattern

This commit is contained in:
ismayilmalik 2018-01-23 23:14:07 +03:00
parent 9c06317098
commit 2ff56c4952

View File

@ -17,6 +17,7 @@
- [Composition](#composition) - [Composition](#composition)
- [Adapter](#adapter) - [Adapter](#adapter)
- [Bridge](#bridge) - [Bridge](#bridge)
- [Decorator](#decorator)
- [Behavioral patterns](#behavioral-patterns) - [Behavioral patterns](#behavioral-patterns)
- [Chain of responsibility](#chain-of-responsibility) - [Chain of responsibility](#chain-of-responsibility)
- [Strategy](#strategy) - [Strategy](#strategy)
@ -70,6 +71,9 @@ classes work together that couldn' t otherwise because of incompatible interface
### Bridge ### Bridge
Decouple an abstraction from its implementation so that the two can vary independently. Decouple an abstraction from its implementation so that the two can vary independently.
### Decorator
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
## Behavioral patterns ## Behavioral patterns
Behavioral patterns are concerned with algorithms and the assignment of responsibilities Behavioral patterns are concerned with algorithms and the assignment of responsibilities
between objects. Behavio ral patterns describe not just patterns of objects or classes between objects. Behavio ral patterns describe not just patterns of objects or classes