Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java You work for a company that has warehouses of items. The items are all packaged in boxes that are roughly the same size. //

java

You work for a company that has warehouses of items.

  1. The items are all packaged in boxes that are roughly the same size. // double box
  2. Each warehouse has some shelves in it. //Double shelve
  3. The shelves all hold the same number of boxes. // shelves == boxes
  4. 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.
  5. The constructor will be given the number of shelves and the number of items which are held per shelf.
  6. 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.
  7. Your warehouse object will have a method to receive a truckload.
  8. 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.
  9. 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).
  10. Your warehouse object will have a method to ship an item.
  11. The shipment request will contain the item code as well as the number of boxes requested.
  12. 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.
  13. 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.
  14. Along with the shelfCount and shelfCapacity properties, you will need 1 or more additional private properties in your class to keep track of which item is stored at each shelf and how full each shelf is. It is up to you to decide how to do this. Any additional properties you add should be private, and should not have getters or setters.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

( 1 4 ) Consider the following fragment of C code:

Answered: 1 week ago

Question

describe the main employment rights as stated in the law

Answered: 1 week ago