First pattern: Strategy pattern