design patterns implementation in C++