Question: C++ Implement the queue class as shown below. (don't use STL verison please) Use it to store 5 students waiting outside Student Services to meet
C++
Implement the queue class as shown below.
(don't use STL verison please)
Use it to store 5 students waiting outside Student Services to meet with advisors. Add data to each node which includes student ID and major.
Add a member function displayQueue which displays the contents of the queue. Write the main function to test the queue. Be sure to show the contents of queue after adding or removing each student.
-------------------------------------------------------------- my queue class #ifdef queue_h #define queue_h namespace queues { struct queueNode{ char data; queueNode *link; }; typedef queueNode* queueNodePtr; class queue { public: queue(); queue(const queue& aQueue); ~queue(); void add(char item); char remove(); bool empty() const; private: queueNodePtr front; queueNodePtr back; }; } #endif
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
