Question: this is the given pseudocode. Now I need the code in C++ please Create a listNode class friend of LLStack, LLQueue, Lllist -data (int) next

this is the given pseudocode. Now I need the code in C++ please
this is the given pseudocode. Now I need the code in C++

Create a listNode class friend of LLStack, LLQueue, Lllist -data (int) next (listNode) Method: - constructor (data) //create a node with given data -printNode (node, outFile) in the format as below: (node's data, data of node's next) @ Create LLQueue class - listNode* head // head always points to the dummy node! - listNode* tail // tail always points to the last node of the queue; tail points to dummy initially. Methods: - constructor (...) // creates a new Queue with a dummy node, set the data in the dummy node to -9999 and sets next to null; let both head and tail point to the dummy node. buildQueue (inFile) // see algorithm below. Implement all other Queue operations on your own. "Use the following queue operations in buildQ. You may add other operations as needed. - inserto (newNode) // insert the newNode after the tail of Q. - listNode deleteQ (...) // if Q is not empty, deletes the first node, after the dummy trom Q and returns the 7/ deleted node, otherwise, returns null bool isEmpty (...) // checks to see if Q is empty, ie tall points to the dummy node. It returns true is Q is empty and false otherwise. print (outFile2) // DO NOT delete nodes in Queue! Outputs to outFile2. the entire o, including the dummy node, you may calling printNode (...) using the following format: Front -->(-9999, next's dato1)--> (dato, next's data)......Ha data, NULL)HE NULL For example: Front-->(-9999, 8)-->(8.11) -->011, 21) 1>(21, 42) HAE (87 NULLI> NULL

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!