Highlights
You work for a company that has warehouses of items. The items are all packaged in boxes that are roughly the same size. Each warehouse has some shelves in it. The shelves all hold the same number of boxes. To keep things from getting confusing, a shelf will only contain one kind of item on it, and a warehouse will have at most one shelf storing a given kind of item.
You will create a Warehouse class to simulate a warehouse. The constructor will be given the number of shelves and the number of items which are held per shelf. When the warehouse is constructed, the shelves are empty. The get methods will report back the shelf count and capacity that the warehouse was constructed with.
Your warehouse object will have a method to receive a truckload. A truckload will have only one kind of item (represented by an item code number) as well as the number of boxes of that item. You will load as many boxes as you can of that item given the above rules and return the number of boxes left on the truck (not loaded).
public int receive(int itemCode, int itemCount)
Your warehouse object will have a method to ship an item. The shipment request will contain the item code as well as the number of boxes requested. The warehouse will ship out as many as it can, up to the amount requested. Your method will return the number of boxes shipped of that item.
public int ship(int itemCode, int itemCount)
Both the receive and ship methods will have to update the internal tracking of items as items are received and shipped out. Different warehouses operate independently of each other and can have similar or entirely different sets of items.
You may assume that every integer (shelf count, shelf capacity, item code, and item count) given to your methods is greater than 0.
The back side of this sheet describes an example scenario.
This IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.