Update assignment6.cpp