Design an inventory class that stores the following members: serialNum: An integer that holds a part's serial number. manufactYear: An integer that holds the year the part was manufactured. lotNum: An...


In c++


Also explain each line by adding comments


Design an inventory class that stores the following members:<br>serialNum: An integer that holds a part's serial number.<br>manufactYear: An integer that holds the year the part was manufactured.<br>lotNum: An integer that holds the part's lot number.<br>The cla ss should have appropriate member functions for storing data into, and retrieving<br>data from, these members.<br>Next, design a sta ck class that can hold objects of the class described above.<br>Last, design a program that uses the sta ck cla ss described above.<br>The program should have a loop that a sks the user if he or she wishes to add a part to<br>inventory, or take a part from inventory. The loop should repeat until the user is finished.<br>If the user wishes to add a part to inventory, the program should a sk for the serial number,<br>year of manufacture, and lot number.<br>The data should be stored in an inventory object, and pushed onto the stack.<br>If the user wishes to take a part from inventory, the program should pop the top-most part<br>from the stack and display the contents of its member variables.<br>When the user finishes the program, it should display the contents of the member values of<br>all the objects that remain on the stack.<br>

Extracted text: Design an inventory class that stores the following members: serialNum: An integer that holds a part's serial number. manufactYear: An integer that holds the year the part was manufactured. lotNum: An integer that holds the part's lot number. The cla ss should have appropriate member functions for storing data into, and retrieving data from, these members. Next, design a sta ck class that can hold objects of the class described above. Last, design a program that uses the sta ck cla ss described above. The program should have a loop that a sks 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 a sk for the serial number, year 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.

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here