The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 431 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
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. If you
wish, you may use the template you designed in Programming Challenge 1 or 2.
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
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll