Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design an inventory class that can hold information and calculate data for items

ID: 3627531 • Letter: D

Question

Design an inventory class that can hold information and calculate data for items in a retail store’s inventory. The class should have the following private member variables:
1. itemNumber
2. quantity
3. cost
4. total cost
The class should also have the following functions
1. default constructor – set all member variables to 0
2. constructor #2 – accepts an item’s number, cost and quantity as arguments. The function should copy these values to the appropriate member variables and then call the SetTotalCost
3. SetItemNumber – accepts an integer argument that is copied to the itemNumber member variable
4. SetQuantity – accepts an integer argument that is copied to the quantity member variable
5. setCost – accepts a floating point argument that is copied to the quantity member variable
6. setTotalCost – calculates the total inventory cost for the item ( quantity times cost) and stores the result in total cost
7. getItemNumber – returns the value in itemNumber
8. getQuantity – returns the value in item quantity
9. getCost – returns the value in cost
10. getTotalcost – returns the value in total cost
Your program should have a menu to allow users select relevant tasks

Explanation / Answer

The answer is 42 and life.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote