Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume the Jerusalem Bank is start at 8 AM and end at 2 PM every day. The customers need to do tasks in the bank.

Assume the Jerusalem Bank is start at 8 AM 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
----------------
Give me asolution. With queue bank in data structure
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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

1. Who is responsible for resolving this dilemma?

Answered: 1 week ago