Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++ image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

What is topology? Explain with examples

Answered: 1 week ago

Question

How effective was the school improvement plan?

Answered: 1 week ago

Question

Data points include: surveys, discipline, demographics

Answered: 1 week ago

Question

What environmental factors influenced achievement?

Answered: 1 week ago