Question: 7. Inventory Class Design an Inventory class that can hold information for an item in a retail store's inventory. The class should have the following

 7. Inventory Class Design an Inventory class that can hold information

7. Inventory Class Design an Inventory class that can hold information for an item in a retail store's inventory. The class should have the following private member variables. Variable Name itemNumber quantity Description An int that holds the item's number. An int that holds the quantity of the item on hand. A double that holds the wholesale per-unit cost of the item cost The class should have the following public member functions. Member Function default constructor constructor #2 Description Sets all the member variables to 0. Accepts an item's number, quantity, and cost as arguments. Calls other class functions to copy these values into the appropriate member variables. Then calls the setTotalCost function. Member Function set ItemNumber set Quantity set Cost Description Accepts an int argument and copies it into the itemNumber member variable. Accepts an int argument and copies it into the quantity member variable. Accepts a double argument and copies it into the cost member variable. Returns the value in itemNumber. Returns the value in quantity. Returns the value in cost. Computes and returns the totalCost. getItemNumber getQuantity get Cost getTotalCost

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!