Question: C++: 1) Implement the unfinished methods of DLL class. Modify the methods in DLL.cpp, do NOT change anything in DLL.h or test.cpp. Use test.cpp to
C++:
1) Implement the unfinished methods of DLL class. Modify the methods in DLL.cpp, do NOT change anything in DLL.h or test.cpp. Use test.cpp to test your implementations.
This is DLL.h:
#include
struct Node{ string ssn; string name; Node* succ; Node* pred; };
class DLL{ private: Node* headPtr; int itemCount; public: DLL(); DLL(DLL& n); virtual ~DLL(); Node* getHeadPtr(); int search(string ss) const; bool insert(string ss, string name, int & count); bool remove(string ss, int & count); int size(); void display(); };
This is DLL.cpp w/ Unfinished Methods:
#include "DLL.h" #include
// default constructor is already implemented // do not modify the default constructor DLL::DLL(){ headPtr = nullptr; itemCount = 0; }
// return the head pointer of the list // it is already implemented, do not modify it Node* DLL::getHeadPtr(){ return headPtr; }
// copy construct, which copies an existing list n // the new list is a different object from n // the new list and object n have the same contents // Please implement it DLL::DLL(DLL& n){ }
This is the text file that the file is working on:
i 586412373 NICOLA EVANGELISTA i 177228167 MEAGAN LEKBERG i 586412373 JEFF DUTTER i 760846483 KITTY MANZANERO i 061899135 CATHERIN MCCREIGHT i 087300880 CARMA KULHANEK i 177264549 VALERY KOSAKOWSKI i 210044984 SHEILAH MONGES d 760846483 KITTY MANZANERO r 760846483 KITTY MANZANERO r 007980295 DELPHIA SIMISON i 493515916 VERONIKA TADENA d 401991909 MCKINLEY WESTERFELD i 793267575 TEMIKA MESHEW i 319373939 MARGIT EBLIN
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
