Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this task, you are supposed to implement a Java program for the scheduling problem of a famous online order delivery company by using heap-based
In this task, you are supposed to implement a Java program for the scheduling problem of a famous online order delivery company by using heap-based priority queue. The manager is trying to find how many couriers work in the order delivery part. For each courier in the order delivery, the expense of the company increases; but according to the standards of this company, the average waiting time for all customers should not exceed a given amount of time. So, the manager needs to optimize this number and calls for your help in this task. This company has the data of predict delivery time of customers. Your program should use these data to calculate average waiting times and find the minimum number of couriers needs to meet the average waiting time requirement. You must use your own implementation of heap-based priority queue by taking inspiration from your textbook or web. You are not allowed to use any external library or .jar file. The input data are stored in a plain .txt file. The first line of the file shows the number of customers. The subsequent lines contain four integers, each separated by one or more whitespace characters (space or tab). These represent, respectively, the customer id, the registration year of the customer to the company (the company was founded in 1968), arrival time for order (in
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