Strategy Strategy Intent Define a family of algorithms, encapsulate each one, and make them interchangeable.
Strategy lets the algorithm vary independently from the clients that use it.
These embedded policy mechanisms routinely manifest themselves as multiple, monolithic, conditional expressions. Discussion Replace the many, monolithic, conditional constructs with a Strategy inheritance hierarchy and dynamic binding. Identify the protocol that provides the appropriate level of abstraction, control, and interchangeability for the client. Specify this protocol in an abstract base class. Move all related conditional code into their own concrete derived classes.