Strategy Design Pattern with Java Enum
The Strategy is a design pattern that allows the software to chose one from a family of algorithms during the runtime. Each algorithm is implemented in its own class, which makes their clients interchangeable. Using the Strategy design pattern, a class can execute the same method in different ways, with different implementations. It is one of the patterns in the book Design Patterns by Gamma et al.