What are the rows?
Quote:
|
During add_items function, need to add the number of items to this shelves.
|
Where? Do you or your teacher realize that the
add_item() method belongs in the Shelf class?
I'll explain:
Object Orient programming is
programming by behaviour, not by value. That means that a Shelf should manage it's own items.
And the Warehouse should manage it's own Shelves. All the Warehouse can do is restrict the amount of Shelves and Items on a Shelf.
So an array like:
Warehouse[10][2] is a bad design.
Explaining is hard isn't it? Right now, you haven't got a clue how many interpretations I could have

.