Solutions for C++ Problem Set 3