***C++***
Expand on the given code to meet the following parameters:
Code:
#include #include using namespace std; struct QNode { string data; QNode* next; QNode(string d) { data = d; next = NULL; } }; struct Queue { QNode *front, *rear; Queue() { front = rear = NULL; } void enQueue(string x) { // Create a new LL node QNode* temp = new QNode(x); // If queue is empty, then // new node is front and rear both if (rear == NULL) { front = rear = temp; return; } // Add the new node at // the end of queue and change rear rear->next = temp; rear = temp; } // Function to remove // a key from given queue q void deQueue() { // If queue is empty, return NULL. if (front == NULL) return; // Store previous front and // move front one node ahead QNode* temp = front; front = front->next; // If front becomes NULL, then // change rear also as NULL if (front == NULL) rear = NULL; delete (temp); } }; // Driven Program int main() { cout data data data data data data data data data data data data data data data data data data data data Parameters:
1.- You program will collect the name of 10 students storing them in a linked list queue. 2.- Your program will display the name of the students ordered (FIFO) on the screen 3.- Your program will ask if the end-user wants to clean the queue (Y/N question). 3.1 - If the answer is yes, your program will dequeue all the nodes of the list and start asking for the names of the next batch of 10 students to process. 3.2 - If the answer is no then your program will exit