Skip to content

Commit ab31578

Browse files
committed
Update README.md
1 parent ee54d6a commit ab31578

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@
244244
# Frequently asked questions
245245

246246
**Q: What is the difference between State and Strategy patterns?**
247-
A: While the implementation is similar they solve different problems. The State pattern deals with what state an object is in - it encapsulates state-dependent behavior. The Strategy pattern deals with how an object performs a certain task - it encapsulates an algorithm.
247+
248+
While the implementation is similar they solve different problems. The State pattern deals with what state an object is in - it encapsulates state-dependent behavior. The Strategy pattern deals with how an object performs a certain task - it encapsulates an algorithm.
248249

249250
**Q: What is the difference between Strategy and Template Method patterns?**
250-
A: In Template Method the algorithm is chosen at compile time via inheritance. With Strategy pattern the algorithm is chosen at runtime via composition.
251+
252+
In Template Method the algorithm is chosen at compile time via inheritance. With Strategy pattern the algorithm is chosen at runtime via composition.

0 commit comments

Comments
 (0)