What is the difference between Strategy design pattern and State design pattern?
What are the differences between the Strategy design pattern and the State design pattern? I was going through quite a few articles on the web but could not make out the difference clearly. Can someone please explain the difference in layman's terms? Honestly, the two patterns are pretty similar in practice, and the defining difference between them tends to vary depending on who you ask. Some popular choices are: States store a reference to the context object that contains them. Strategies do not. States are allowed to replace themselves (IE: to change the state of the context object to