From 2ff56c49526da784e7f03604748f47c8b7d102a5 Mon Sep 17 00:00:00 2001 From: ismayilmalik Date: Tue, 23 Jan 2018 23:14:07 +0300 Subject: [PATCH] implemented decorator pattern --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 68d4d28..0cb0f47 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - [Composition](#composition) - [Adapter](#adapter) - [Bridge](#bridge) + - [Decorator](#decorator) - [Behavioral patterns](#behavioral-patterns) - [Chain of responsibility](#chain-of-responsibility) - [Strategy](#strategy) @@ -70,6 +71,9 @@ classes work together that couldn' t otherwise because of incompatible interface ### Bridge 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 are concerned with algorithms and the assignment of responsibilities between objects. Behavio ral patterns describe not just patterns of objects or classes