From 7aa555313bfb004a4134da13c143deef86c8efaa Mon Sep 17 00:00:00 2001 From: Petrutiu Mihai Date: Wed, 13 Jul 2016 13:42:11 +0300 Subject: [PATCH] Update readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 1480a9d..0aebaed 100644 --- a/README.md +++ b/README.md @@ -309,12 +309,19 @@ If we want to implement this using state pattern, we would need to make a new cl * AcceptanceTestsPassed - moves user story from state Resolved to state Closed * Motivational example class: ScrumExample.ScrumMotivationalExample + 8. Strategy pattern ------------------ ### a. Pattern description +Strategy pattern (also known as the policy pattern) is a software design pattern that enables an algorithm's behavior to be selected at runtime. +The strategy pattern defines a family of algorithms, encapsulates each algorithm, and makes the algorithms interchangeable within that family. ### b. When to use Strategy pattern +* Classical thing to say: Whenever you start to use a switch statement you should ask yourself whether you can use Strategy Pattern instead. +* When you want to externalize part of the algorithm + ### c. Actors + ### d. Pitfalls ### e. Flavors ### f. Examples