COSC 311 Homework hw1011
Distributed: 10/11/2018 Due: 10/18/2018
Create a circular queue implemented on a 1D array, size 10.
Initialize one random number generator with seed 3.
Modify the insert and delete code so that errors are ignored.
Repeat the following 3 times: Generate a random number x between 1 and 5 Repeat x times: Generate a random number a between 0 and 99 Insert a to the queue Generate a random number y between 1 and 5 Repeat y times: Delete from the queue
Output the resulting queue. If the queue is empty, output: "Empty queue".
Constraints: (1) Must use a 1D array circular queue. (2) Must use a single random number generator, which is seeded with 3.
Points taken off for: (1) Doesn't work (2) Fails to meet style constraints (3) Code does not match output (4) Ugly or difficult to understand code
Turn in: (1) Hard copy of code (2) Header with your last name, home work identifier (hw1011), URL of source code (3) Screen shot showing program execution