When Should strategy pattern be used?

Use the Strategy pattern when you want to use different variants of an algorithm within an object and be able to switch from one algorithm to another during runtime. Use the Strategy when you have a lot of similar classes that only differ in the way they execute some behavior.

Sizin İçin Seçtik  Is strategy a pattern?

Leave a Reply

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