Answer question 2(a) to 2(b) based on the following code below struct Queue { int front; int rear; int maxsize; int" arr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Answer question 2(a) to 2(b) based on the following code below struct Queue { int front; int rear; int maxsize; int" arr
question 2(a) to 2(b) based on the following code below struct Queue { int front; int rear; int maxsize; int" arraynum; Queue(int c) ( }; }; // points to the front element in the queue (if any) // rear points to last element in the queue // maximum size of the queue // an array that stores queue elements front=0; rear = 0; maxsize = c; _(a)_ __// lines given are not indication of answer (b). _// lines given are not indication of answer 2a) Based on the following code above, please complete the constructor Queue code segment as shown in a. [1 mark] 2b) Based on the following code above, please write the destructor Queue code segment as shown in b. [2 marks]
Answer