add ex2 (C++ Class review)