Strategy pattern example

Example of some code that is refactored using the strategy pattern.