Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

In the programming language of your choice, simulate the experience of a day's business at a bank.

Your implementation must make use of a min heap, and must fit the following criterion:

At program launch, it will query the user for the number of tellers working that day. There must be at least four tellers, and no more than ten tellers.

If a number is passed in outside of those bounds, have your program round up to four or down to ten as appropriate for the input.

Your tellers will be represented by the min-heap of a size equal to the number of tellers.

To start mo simulation generate 100-200 customers randomly, and place them in a queue.

Each customer will have a total service time that it will take to conclude their business.

Dequeue customers from the queue into your min-heap until it is full. The customer service time is the metric which will be used to balance the heap.

Pop the top customer off of your heap, and decrement the service time for all customers remaining in the heap.

If a customer which is still in the heap has their service time reach 0 in this process, remove that customer from the heap.

Populate the heap back to maximum capacity through dequeueing from your queue

Repeat steps 4 and 5 until both the heap and queue are empty Every 20 customers that pass out of the queue, print the current status of the queue (how many customers are left), and print the current composition of the heap.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93096659

Have any Question?


Related Questions in Computer Engineering

Question an agile-focused mind-set in project

Question: "An Agile-focused Mind-set in Project Management" • Read the following two (2) articles: "The Scrum Guide," located here and "Core Scrum," located here. Contrast the role of a Scrum Master and the role of a pro ...

What is 4g and its benefits how fast is your internet

What is 4G and its benefits. How fast is your Internet service supposed to be for stationary users?

Question suppose f is a function that returns the result of

Question : Suppose f is a function that returns the result of reversing the string of symbols given as its input, and g is a function that returns the concatenation of the two strings given as its input. If x is the stri ...

Given the following table keynbspand fds repair

Given the following table, key and FDs, REPAIR (RepairInvoiceNumber, RepairDate, RepairCost, RepairEmployeeName, RepairEmployeePhone, SerialNumber, Type, TankCapacity) Candidate Keys: RepairInvoiceNumber, and (RepairDate ...

Determine the mass of the water by using the waters density

Determine the mass of the water by using the water's density (specific to the initial temperature) and the volume of the water. Remember,  density = mass/volume . You can look up the density of the water at your specific ...

Can someone help solve this problem in lisp-programming

Can someone help solve this problem in Lisp-Programming language? More specifically in DrRacket. Exercise: A professor keeps the quiz grades of a student in a non-empty vector of non-negative numbers. Write a function th ...

Question suppose that you have 2 dfas and have 7 and 6

Question : Suppose that you have 2 DFAs and have 7 and 6 states respectively, and 3 and 4 final states respectively. If I built the product DFA for the intersection of their languages, how many final states will the resu ...

Question suppose a computer using direct mapped cache has

Question Suppose a computer using direct mapped cache has 2 40 bytes of byte-addressable main memory and a cache of 64 blocks, where each block contains 32 bytes. a. how many blocks pf main memory are there? b. what is t ...

A shipment of 11 televisions sets contains 4 defective sets

A shipment of 11 televisions sets contains 4 defective sets. A hotel purchases 7 of these televisions sets. a: In how many ways can a hotel purchase 7 and receive 2 of the defective sets? b: What is the probability that ...

The system development team at the xyz company is working

The system development team at the XYZ Company is working on developing a new customer order entry system. In the process of designing the new system, the team has identified the following data entity attributes: Invento ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As