Write the class definition for this queue in pseudocode or


A First-In First-Out queue consists of an array of maximum of 20 integers, a head pointer and a tail pointer which are integers showing the indexes of the first and last data positions in the array.

a) Write the class definition for this queue, in pseudocode or C++, which has the array, head and tail pointers as public data structures, and enque(int) and int dequeue() as two methods. The contsructor initializes head and tail pointers to NULL.

b) Create a q1 object of this class and insert 12 and 7 data items into q1 consecutively and show the queue after each operation.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write the class definition for this queue in pseudocode or
Reference No:- TGS01541397

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)