Assignment 4 for C++ Class