What is the difference between strategy design pattern and State design pattern?

State design pattern is used to define and manage state of an object, while Strategy pattern is used to define a set of interchangeable algorithm and lets client to choose one of them. So Strategy pattern is a client driven pattern while Object can manage there state itself.

Sizin İçin Seçtik  What is a Command pattern in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *