code for C++ class for fall semester