NOTE: Answer is required in Java Eclipse Suppose a business person launches new cinema at Islamabad and ask his team to develop a ticket system for box office. He assigns some requirements about system that how should it work. The requirements are such a way that there are only '5' number of box office windows in the theatre. Each window can have at max '20' number of people waiting in line. To start with, only one window is opened.  If the number of people waiting in line in that window exceeds 20, then the next window is opened and people can join the line in that window. Likewise, if both the first and second windows have n number of people waiting in each queue, then a third window is opened. This can go on until the maximum number of windows w is reached. Let us assume that once a window is opened it never closes. A new window is only opened if all open windows are full. Each person can buy only one ticket. So, the system should not allot more than one ticket per person. Let us assume that the system issues one ticket each across all open windows. When a ticket is issued, the count of the number of people in each open queue is reduced by 1. When a new person has to join the queue, the system has to prompt him to join a queue such that they are issued a ticket as fast as possible. The system prompts the person based on these factors: o First it looks for an open window with the least number of people and prompts that window number. If more than one window has the least number of people, then the system can prompt the person to join the first window (smaller window ld) it encounters with the least number of people. If the queues of all open windows are full and a new window can be opened, then the new person is prompted to join the new queue for the new box office window. O If all queues for all windows are full, a corresponding message is displayed. That person need not be considered in the next iteration .After a queue is prompted to a person, the person or system cannot change the queue. Implement the system based on above scenario in java using suitable data structure

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

NOTE: Answer is required in Java Eclipse

Suppose a business person launches new cinema at Islamabad and ask his team to develop a ticket system for box office. He assigns some requirements about system that how should it work. The requirements are such a way that there are only '5' number of box office windows in the theatre. Each window can have at max '20' number of people waiting in line. To start with, only one window is opened.  If the number of people waiting in line in that window exceeds 20, then the next window is opened and people can join the line in that window. Likewise, if both the first and second windows have n number of people waiting in each queue, then a third window is opened. This can go on until the maximum number of windows w is reached. Let us assume that once a window is opened it never closes. A new window is only opened if all open windows are full. Each person can buy only one ticket. So, the system should not allot more than one ticket per person. Let us assume that the system issues one ticket each across all open windows. When a ticket is issued, the count of the number of people in each open queue is reduced by 1.

When a new person has to join the queue, the system has to prompt him to join a queue such that they are issued a ticket as fast as possible. The system prompts the person based on these factors: o First it looks for an open window with the least number of people and prompts that window number. If more than one window has the least number of people, then the system can prompt the person to join the first window (smaller window ld) it encounters with the least number of people. If the queues of all open windows are full and a new window can be opened, then the new person is prompted to join the new queue for the new box office window. O If all queues for all windows are full, a corresponding message is displayed. That person need not be considered in the next iteration .After a queue is prompted to a person, the person or system cannot change the queue.

Implement the system based on above scenario in java using suitable data structure

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education