4) Consider the following Queue class that uses linked list to constract a Queae class Node; typedef Node NodePtr; class Node public: int number; NodePtr next; Node({number =0; next NULL;} Node(int...


Please help with the follow question in C++


4) Consider the following Queue class that uses linked list to constract a Queae<br>class Node;<br>typedef Node NodePtr;<br>class Node<br>public:<br>int number;<br>NodePtr next;<br>Node({number =0; next NULL;}<br>Node(int n){number=n; next-NULL;}<br>11-<br>class Queue<br>private:<br>NodePtr top;<br>int currSize;<br>const int fullSize;<br>public:<br>I/ initializes the Queue to an empty Queue (fixed size of 5)<br>Queue ()<br>fullSize = 5;<br>currsize =0;<br>top = NULL;<br>I/ initializes the Queue to an empty Queue and specific maximum size<br>Queue (int maxSize)<br>fullSize = maxSize;<br>currsize =0;<br>top NULL;<br>Palke?<br>int enqueue (int item); // places an item into the Queue. Returns-1 if operation is soE saccessfal<br>int dequeue (int& item); // removes an item from the Queue. Returns-1 if operation is not succesfist<br>bool empty0;<br>bool full();<br>Il checks if the Queue is empty<br>Il checks if the Queue is full<br>Note: Please answer the question on the next page<br>

Extracted text: 4) Consider the following Queue class that uses linked list to constract a Queae class Node; typedef Node NodePtr; class Node public: int number; NodePtr next; Node({number =0; next NULL;} Node(int n){number=n; next-NULL;} 11- class Queue private: NodePtr top; int currSize; const int fullSize; public: I/ initializes the Queue to an empty Queue (fixed size of 5) Queue () fullSize = 5; currsize =0; top = NULL; I/ initializes the Queue to an empty Queue and specific maximum size Queue (int maxSize) fullSize = maxSize; currsize =0; top NULL; Palke? int enqueue (int item); // places an item into the Queue. Returns-1 if operation is soE saccessfal int dequeue (int& item); // removes an item from the Queue. Returns-1 if operation is not succesfist bool empty0; bool full(); Il checks if the Queue is empty Il checks if the Queue is full Note: Please answer the question on the next page

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here