Answered step by step
Verified Expert Solution
Question
1 Approved Answer
template class DList { friend class UnitTests _ Lab 3 ; / / Giving access to test code struct Node { / / NOTE: Values
template
class DList
friend class UnitTestsLab; Giving access to test code
struct Node
NOTE: Values set to for unit test purposes
Type data;
Node next reinterpretcast;
Node prev reinterpretcast;
Nodeconst Type& data, Nodenext nullptr, Nodeprev nullptr
TODO: Implement this method
;
public:
class Iterator
public:
Node mCurr reinterpretcast;
Iterator& operator
TODO: Implement this method
Iterator operatorint
TODO: Implement this method
Iterator& operator
TODO: Implement this method
Iterator operatorint
TODO: Implement this method
Type& operator
TODO: Implement this method
bool operator const Iterator& iter const
return mCurr iter.mCurr;
;
Data members
NOTE: All values set to for unit test purposes
Node mHead reinterpretcast;
Node mTail reinterpretcast;
sizet mSize ;
public:
DList
TODO: Implement this method
~DList
TODO: Implement this method
DListconst DList& copy
TODO: Implement this method
DList& operatorconst DList& assign
TODO: Implement this method
void AddHeadconst Type& data
TODO: Implement this method
void AddTailconst Type& data
TODO: Implement this method
void Clear
TODO: Implement this method
Iterator InsertIterator& iter, const Type& data
Implement this method
Iterator EraseIterator& iter
TODO: Implement this method
Iterator Begin const
TODO: Implement this method
Iterator End const
TODO: Implement this method
;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started