Answered step by step
Verified Expert Solution
Link Copied!

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 8AM and end at 2 PM every day. The customers need to do tasks in the bank. The customer-task 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 8AM and 2PM
Task wait time// the waiting time before the task is starting (start time-arrival time)
Task start time// when the task is being served. (arrival time + wait time)
Task period time//the number of minutes needed to finish the task.
Task Priority// there are 3 types of priorities
a. Normal task (has no priority)
b. Important // in this case we decrease 2 minutes from the arrival time
c. VIP // in this case we decrease 5 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 n number of tasks. // create n tasks with random information in an array, then sort the array according to the arrival time and insert it to the queue.
R-arrange the queue //check the wait time for each 5 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Small Business Management Entrepreneurship and Beyond

Authors: Timothy s. Hatten

5th edition

538453141, 978-0538453141

More Books

Students also viewed these General Management questions