Strategy Design Pattern in C++