Strategy Pattern
Strategy Pattern

Strategy pattern is mainly used for composition rather than inheritance. It defines a family of algorithms encapsulates each one and makes them interchangeable. Strategy makes algorithm change independently without client changing it. Strategy decouples algorithm from the client using it which means if I have to change the algorithm, I don’t have to change the... » read more