diff --git a/README.md b/README.md index 0d9eec5e2..132d7d7e6 100644 --- a/README.md +++ b/README.md @@ -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.