Modified Activity 8 c++ file. Added all necessary functionality.