class List { private: class Node { public: int data; Node * next; Node (int data, Node *next) { Node::data = data; Node::next = next; } }; Node *head; // Utility method to delete all elements of a list. void deleteList(); // Utility method to copy from one list to another. void copyFrom (const List &otherList); // sub method to return the number of elements in the list that are equal to value int subCountEqual(int value, Node* subHead) const; // sub method to insert the given value after each even value void subInsertAfterEvens(int value, Node* subHead); // sub method to return true if the two lists are the same length, false otherwise bool subIsSameLengthAs(Node* subHead, Node* otherSubHead) const; public: List () { head = NULL; }; List(const List &otherList); // copy constructor ~List (); // outputs list contents to cout void outputList () const; // adds a value to the list void insert (int value); List& operator=(const List &otherList); // operator= // returns the number of elements in the list that are equal to value int countEqual(int value) const; // inserts the given value after each even value void insertAfterEvens(int value); // returns true if the two lists are the same length, false otherwise bool isSameLengthAs(const List &otherList) const; };