Strategy pattern

A strategy pattern is a behavior pattern and allow selecting or change an algorithm at run time. Generic strategy pattern example First of all, let’s view on a generic example. You need an interface and at least two classes, which are inherited from the interface with different implementations. Furthermore, you …