C++ implementation of Strategy design pattern example from Head First Design Patterns