implemented decorator pattern
This commit is contained in:
parent
9c06317098
commit
2ff56c4952
@ -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
|
||||||
|
Reference in New Issue
Block a user