Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mysql Examples Explanations Explain Examples

Authors: Harry Baker ,Ray Yao

1st Edition

B0CQK9RN2J, 979-8872176237

More Books

Students also viewed these Databases questions