Queue Management
You are working on a Queue management system and need to create the class to hold the queue data, which are customer IDs (integers).
You make a Queue class, which has a size attribute, and an array, to hold the data of the queue.
The class has a remove() method to remove the front item of the queue, a print() method to output the queue.
You need to create an add() method for the Queue class, that will take an item and add it to the end of the queue.
The code needs to be fully working, so that the Queue declaration and manipulation code in main() works.
Solution
void Add(int newinfo){
if (size != 0 || size != 100){
size++;
queue[size-1] = newinfo;
}
}
Given Code:
#include <iostream