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
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,
and isEmpty. Then, show that your program works with both types
of queue implementation -- as a linked list and as an array.
- a new student enters the line; in this case, the student's name should be
- a student in front of the line has been served; in this case,
- if there is a student in line,
the program should print a ticket for this students, with his name
on it; choose any movie title you like;
- otherwise, it should inform you that there are no students
waiting in line.