Question: Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: InvBin and BinManager. The

Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: InvBin and BinManager. The InvBin class holds information about a single bin. The BinManager class will own and manage an array of InvBin objects. The skeleton of the program can be found on page 599 of your book.

Once you have created these two classes, write a menu-driven client program that uses a BinManager object to manage its warehouse bins. It should initialize it to use 9 of the bins, holding the following item descriptions and quantities. The bin index where the item will be stored is also shown here.

1. regular pliers 25 2. n. nose pliers 5 3. screwdriver 25
4. p head screw driver 6 5. wrench-large 7 6. wrench-small 18
7. drill 51 8. cordless drill 16 9. hand saw 12

The modular client program should have functions to display a menu, get and validate the user's choice, and carry out the necessary activities to handle that choice. This includes adding items to a bin, removing items from a bin, and displaying a report of all bins. Think about what calls the displayReport client function will need to make to the BinManager object to create this report. When the user chooses the "Quit" option from the menu, the program should call its displayReport function one last time to display the final bin information. All I/O (user input and output) should be done in the client program. The BinManager class only accepts information, keeps the array of InvBin objects up to date, and return information to the client program.

Input Validation in the BinManager class: The class functions should not accept numbers less than 1 for the number of parts being added or removed from a bin. They should also not allow the user to remove more items from a bin than it currently holds.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!