Question
C programming language: An online retailer has a warehouse, where workers pick items from storage shelves to fulfill customer orders. The picked items can later
C programming language: 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 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 for each 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. To simulate the customer orders, an input file contains the customer orders in the same directory as your program file called hw1.c (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 orderT ime customer numberOfBooks numberOfElectronics PrintAvailableWorkerList printT ime PrintWorkerAssignmentList printT ime PrintMaxFulfillmentTime printT ime 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 and when a worker finishes picking items for the order(s). 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.
Sample Input: CustomerOrder 0800 Frank 7 0 CustomerOrder 0801 George 0 9 CustomerOrder 0802 Harry 8 0 CustomerOrder 0803 Ivan 0 8 CustomerOrder 0804 John 5 0 CustomerOrder 0805 Kate 3 0 CustomerOrder 0806 Lily 1 0 PrintAvailableWorkerList 0810 PrintWorkerAssignmentList 0811 PrintMaxFulfillmentTime 0812
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