Question: C++ ((USE STL verison please)) Implement the queue class as shown above. Use your queue to store the names of 5 students waiting outside Student

C++

((USE STL verison please))

Implement the queue class as shown above. Use your queue to store the names of 5 students waiting outside Student Services to meet with advisors. You may want to add more data to each node including student ID, Major, etc. Add a member function displayQueue which displays the contents of the queue. Write the main function to test the 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

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!