Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in java An online retailer has a warehouse, where workers pick items from storage shelves to fulfill customer orders. The picked items can later be
in java
An online retailer has a warehouse, where workers pick items from storage shelves to fulfill customer orders. The picked items can later be packed and shipped to the customers. Each order could have a different number of items and different categories of items. To save time, a worker can handle more than one order. How would you design a system to assign workers to customer orders? For this assignment, for simplicity: - Assume 1 packing station and 2 categories of items (books and electronics), 5 initially available workers in this order: Alice, Bob, Carol, David, Emily, and each order has at most 10 items. - A worker can be assigned to more than one customer order ("bundling" the orders) if all items in the orders are in the same category, but the total number of items does not exceed 10. For example, if the items are all books and no more than 10 books in multiple orders, they may be bundled. The system should not read in the entire input file before processing orders. - If a worker has capacity to bundle, he/she waits to potentially bundle orders, but should not wait for more than 5 minutes. - Only consecutive orders can be bundled; ie. older orders before newer ones. - Assume each worker needs 1 minute to find and pick each item in the same category and an additional 5 minutes of traveling time between two categories, or between the packing station and a category. To separately manage the customer orders, available workers, and worker assignments, use 3 singly linked lists. We will evaluate your submissions on code01.fit.edu so we strongly recommend you to test your programs on code01.fit.edu. To preserve invisible characters, we strongly recommend you to download, NOT copy and paste, input data files. Input: To simulate the customer orders, an input file contains the customer orders in the same directory as your program file called HW1.java that has the main method. Your submission takes the input file name as a command-line argument. Each line is one of the following: - CustomerOrder orderTime customer numberOf Books numberOf Electronics - PrintAvailableWorkerList printTime - PrintWorkerAssignmentList printTime - PrintMaxFulfillmentTime printTime For simplicity, time is in HHMM format (HH: 00-23 and MM: 00-59), the leading zero is optional. Fulfillment Time is the amount of time between when an order is made/received at a packing station and when a worker finishes picking items for the order(s) and walking back to the packing station. MaxFulfillmentTime is the longest Fulfillment Time among all the orders so far. AvailableWorkerList is in availability order. Ordering of WorkerAssignmentList is the expected completion time of a worker. Output: The program prints events to the standard output (screen). Each event is on one line and possible events are: - CustomerOrder orderTime customer numOf Books numOf Electronics - WorkerAssignment assignmentTime worker customer - OrderCompletion orderCompletionTime customer - AvailableWorkerList time worker1 worker2 ... - WorkerAssignmentList time worker1:customer 1 worker2:customer 2a, customer 2b - MaxFullfillmentTime time numberOf MinutesStep 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