Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Inventory Bin Stack (It must be C++ code) You have been hired by Company X, Inc to develop an inventory control system. The following are

Inventory Bin Stack (It must be C++ code)

You have been hired by Company X, Inc to develop an inventory control system. The following are some guidelines and specifications. You may expand upon these (make sure that the specifications are covered) and be as creative as you like!

Design an inventory class that stores the following members:

serialNum:An integer that holds a part's serial number.

manufactDate:A member that holds the date the part was manufactured.

lotNum:An integer that holds the part's lot number.

The class should have appropriate member functions for storing data into, and retrieving data from, these members.

Next, design a stack class that can hold objects of the class described above.

Last, design a program that uses the stack class described above. The program should have a loop that asks the user if he or she wishes to add a part to inventory, or take a part from inventory. The loop should repeat until the user is finished.

If the user wishes to add a part to inventory, the program should ask for the serial number, date of manufacture, and lot number. The data should be stored in an inventory object, and pushed onto the stack.

If the user wishes to take a part from inventory, the program should pop the top-most part from the stack and display the contents of its member variables.

When the user finishes the program, it should display the contents of the member values of all the objects that remain on the stack.

Finally, once you have completed your lab, analyze your algorithms. Provide a brief review of your stack and explain the time complexity of the individual functions (pop & push).

A sample output is provided below:

----------------------Iventory Menu----------------------------

1. Enter a part into the inventory.

2. Take a part from the inventory.

3. Quit.

Please make a choice(1, 2,or 3): 1

You have chosen to add an item to iventory bin.

Enter the item's serial number: 43

Enter the item's manufacture data: 3/12/2015

----------------------Iventory Menu----------------------------

1. Enter a part into the inventory.

2. Take a part from the inventory.

3. Quit.

Please make a choice(1, 2, or 3): 3

Goodbye!

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions