Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume the Jerusalem Bank is start at 8 A M and end at 2 PM every day. The customers need to do tasks in the
Assume the Jerusalem Bank is start at and end at PM every day. The customers need to do tasks in the bank. The customertask is a class with the following attribute:
Task ID
Task name credit debit, query, open an account, close an account, etc..
Task arrival time must between and
Task wait time the waiting time before the task is starting start timearrival time
Task start time when the task is being served. arrival time wait time
Task period timethe number of minutes needed to finish the task.
Task Priority there are types of priorities
a Normal task has no priority
b Important in this case we decrease minutes from the arrival time
c VIP in this case we decrease minutes from the arrival time
This simulation of the bank system should be implemented using queue fundamentals.
Create the following menu to simulate and implement the above system
Add a task add a single task with necessary information
Add number of tasks. create tasks with random information in an array, then sort the array according to the arrival time and insert it to the queue.
Rarrange the queue check the wait time for each minutes wait move the task one position toward the front of the queue.
Print task information
Total wait time for all tasks
Time needed to finish all tasks
How many task can't complete and done today
Print the information of a served task
Print the information of all tasks not yet served.
Exit
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