Can anyone help me in this this is what I have done upto but something is still missing
#include <iostream> using namespace std; class Queue { int size; int* queue; int rear; int count; public: Queue(int a) { size = a; queue = new int[size]; rear = -1; count = 0; } void remove() { if (size == 0) { cout << "Queue is empty"<<endl; return; } else { for (int i = 0; i < size ; i++) { queue[i] = queue[i + 1]; } size--; } } void print() { if (size == 0) { cout << "Queue is empty"<<endl; return; } for (int i = 0; i < size; i++) { cout<<queue[i]<<" <- "; } cout <<endl; } //your code goes here void add(int x) { if(size <= 0) {cout<<"Empty";} else { rear = (rear + 1) % size; queue[rear] = x; count++; } } }; int main() { Queue q(7); q.add(42); q.add(2); q.add(8); q.add(1); q.print(); q.remove(); q.add(128); q.print(); q.remove(); q.remove(); q.print(); return 0; }