Update README.md
This commit is contained in:
parent
ee54d6a3ea
commit
ab315782ec
@ -244,7 +244,9 @@
|
||||
# Frequently asked questions
|
||||
|
||||
**Q: What is the difference between State and Strategy patterns?**
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
**Q: What is the difference between Strategy and Template Method patterns?**
|
||||
A: In Template Method the algorithm is chosen at compile time via inheritance. With Strategy pattern the algorithm is chosen at runtime via composition.
|
||||
|
||||
In Template Method the algorithm is chosen at compile time via inheritance. With Strategy pattern the algorithm is chosen at runtime via composition.
|
||||
|
Loading…
x
Reference in New Issue
Block a user