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 dif
State comes with a little bit dependencies within the state derived classes: like one state knows about other states coming after it. For example, Summer comes after winter for any season state, or Delivery state after the Deposit state for shopping.
On the other hand, Strategy has no dependencies like these. Here, any kind of state can be initialized based on the program/product type.