Question: In c++ For this programming assignment, you will complete the following tasks: (a) In a header file (named lnventory.h), define a class Inventory that can

In c++  In c++ For this programming assignment, you will complete the following

For this programming assignment, you will complete the following tasks: (a) In a header file (named lnventory.h), define a class Inventory that can hold information and calculate data for items in a retail store's inventory. The class should have the following member variables and functions: Member Variables (private) Variable Name Description itemNumber An int that holds the item's item number quantity An int for holding the quantity of the items on hand cost A double for holding wholesale per-unit cost of the item totalCost A double for holding the total inventory cost of the item (calculated as quantity x cost) Member Functions (public) Default constructor Sets all the member variables to 0 setItemNumber Accepts an integer argument that is copied to the itemNumber member variable setQuantity Accepts an integer argument that is copied to the quantity member variable setCost Accepts an double argument that is copied to the cost member variable setTotalCost Accepts an double argument that is copied to the totalCost member variable getItemNumber Returns the value in itemNumbex getQuantity Returns the value in quantity getCost Returns the value in cost getTotalCost Returns the value in totalCost Write a driver program (named lnventory.cpp) that demonstrates the Inventory class by: (1) creating three (3) instances/objects of the Inventory class, (2) prompting/asking the user for each instance's itemNumber, quality, and cost, and then (3) displaying (with appropriate labeling) each object's itemNumber, quantity, cost, and totalCost. Successful completion of this assignment includes (but is no limited to): Use of classes and all other C++ constructs necessary for implementation Property named.cpp and .h files Inclusion of the algorithm used to develop your program as comments within your program A program that compiles and executes properly with a header file A program that properly computes and displays the outputs listed above

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!