solid principles c++ examples