/************************************************************************** parameters: - return value: - Destructor, deletes all dynamically allocated parts of an instance of the class. As well as, the instance. **************************************************************************/ Artist::Artist(Artist& a) { cout << "Please enter a new first name: "; getline(cin, firstName); lastName = a.getLastName(); numberOfPaintings = a.getNumberOfPaintings(); pList = new PaintingList(); next = NULL; int i; PaintingList * pl = a.getPaintingList(); Painting * p = pl->getHead(); for(i = 0; i < numberOfPaintings; i++, p = p->getNext()) { pList->appendToTail(p->copy()); } }