Question: C++ Instructions Derive the class intLinkedList from the class unorderedLinkedList as follows: class intLinkedList: public unorderedLinkedList { public: void splitEvenOddList(intLinkedList &evenList, intLinkedList &oddList); //Function to

C++

Instructions

Derive the class intLinkedList from the class unorderedLinkedList as follows:

class intLinkedList: public unorderedLinkedList { public: void splitEvenOddList(intLinkedList &evenList, intLinkedList &oddList); //Function to rearrange the nodes of the linked list so //that evenList consists of even integers and oddList //consists of odd integers. //Postcondition: evenList consists of even integers. // oddList consists of odd integers. // The original list is empty. }; 

Also write the definition of the function splitEvensOddsList. Note that this function does not create any new node, it only rearranges the nodes of the original list so that nodes with even integers are in evensList and nodes with odd integers are in oddsList.

2. Write a program that uses class intLinkedList to create a linked list of integers and then uses the function splitEvensOddsList to split the list into two sublists.

Main.cpp

#include

using namespace std;

int main() {

// Write your main here

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!