An example implementation of the Strategy design pattern in C++