This is a class diagram for strategic design pattern.
Defines a set of encapsulated algorithms that can be swapped to carry out a specific behavior.
- The only difference between many related classes is their behavior.
- Multiple versions or variations of an algorithm are required.
- Algorithms access or utilize data that calling code shouldn't be exposed to.
- The behavior of a class should be defined at runtime.
- Conditional statements are complex and hard to maintain.