Question
A. Objectives Implement and use linked list (10 points) Implement and use stack (10 points) Implement a Queue with linked list (10 points) Use methods
A. Objectives
Implement and use linked list (10 points)
Implement and use stack (10 points)
Implement a Queue with linked list (10 points)
Use methods to do separate and repetitive work. The main method should not have more than 20
lines of code (10 points)
Implement the project correctly (50 points)
10 points will be awarded for use of meaningful identifiers, consistent indentation, explanatory comments in your code and properly formatted output, including screen shots of execution.
B. Description
Suppose you are creating a software for movie theater ticket system. In this project, you have to simulate such a system for booking tickets for movies.
1. Create a data set of 5 movies 2. For each of the movies assign a random number of tickets available for a show (range 2 - 6) 3. Create the tickets such that they have a random price (but fixed for each movie) 4. Assign some random tickets that have a free popcorn offer printed on them
You will try to simulate the process of ticket buying at the counter. The person at the counter has different stacks of tickets for each of the shows. The guests form a queue in front of the counter. As a guest you can do the following:
Display all the shows that have at least 1 ticket remaining
Buy a random number of tickets (up to 5) for any show, if enough seats available
If there are not enough seats for the show of your choice, the system should randomly suggest another
show
You can return any unused tickets (might have free popcorn offer on it) that you had bought before
for a refund. Return up to 5 tickets for a movie at a time. Randomly assign popcorn offer on the
tickets when returned.
The returned tickets are added to the proper stack at the counter, and made available to the next
person
Find the total cost, and pay the amount. Also, display the number of free popcorn that you might
have got.
Simulate the program for 10 customers, or until there are no more seats for any movie, whichever happens first. Once there are no more seats or 10 customers served, inform the guests that the counter has been closed.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started