CS 2401 Assignment #7

Due Date: Monday, April 11 or Tuesday, April 12, depending on the day of your lab.

Objective: The goal of this assignment is to practice the use of queues.

Assignment: On Saturday night, after a week of hard work, many students head to the movies to get some entertainment. Usually, there is a line to buy tickets. The movie is rated R, so you need to show your ID to buy tickets. Your program should use queues to simulate this line. We start with an empty line, and then ask the user to enter one of the following instructions:

Write the code of the main part of the program so that this code only uses the ADT operations enqueue, dequeue, and isEmpty. Then, show that your program works with both types of queue implementation -- as a linked list and as an array.