I need to implement in c++ this non-List member function: void printList(List& theList, bool forward) is a non-member function that prints a list either forwards (by default -- from head to tail) when forward is true, or backwards (from tail to head) when forward is false. You must use your ListItr class to implement this function. I attached my ListItr class I\'m not sure how to implement this method help. This is one of the classes needed to implement a doubly linked list Solution #ifndef LISTITR_H #define LISTITR_H #include #include \"stdafx.h\" // This is the content of the .h file, which is where the declarations go class ListNode{ public: ListNode* previous; int value; ListNode* next; ListNode(); }; class ListItr { public: ListNode* current; ListItr(ListNode* theNode); void Insert(int value) const; bool isPastEnd() const; bool isPastBeginning() const; void moveForward() ; void moveBackward() ; int retrieve() const; }; // This is the end of the header guard #endif // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include \"targetver.h\" #include #include #include #include \"ListItr.h\" // TODO: reference additional headers your program requires here #include \"stdafx.h\" /* for this first you need a class named ListNode */ using namespace std; ListNode::ListNode() { previous=NULL; next=NULL; } ListItr:: ListItr(ListNode* theNode){ current = theNode; } bool ListItr:: isPastEnd() const{ if (current->next==NULL) return true; else return false; } bool ListItr:: isPastBeginning() const{ if (current->previous==NULL) return true; else return false; } void ListItr:: moveForward(){ if (!isPastEnd()) current=current->next; //cout << current; } void ListItr:: moveBackward(){ if (!isPastBeginning()) current=current->previous; //cout << current; } int ListItr:: retrieve() const{ return current->value; } void ListItr::Insert(int value) const{ ListNode* theNode; theNode->value=value; while(!isPastEnd()) { moveForward(); }//loop ends when current-> next is null current->next = theNode;//inserts value at the end of the list theNode->previous=current;//defines previous pointer theNode->next=NULL;//defines next pointer } //Startnode is the first node of the list void printList(ListNode* Startnode, bool forward){ // if(forward==true){ // moveForward(); // } // if(forward == false){ // moveBackward(); // } //object of class ListItr ListItr list(Startnode); if(forward==true) { while(!list.isPastEnd()) { cout<.