Question: Hello -- I need assistance with a C++ programming question from my lab: Class Inventory has three private member variables: string itemname, int quantity and

Hello -- I need assistance with a C++ programming question from my lab:

Class Inventory has three private member variables: string itemname, int quantity and double price. Class Inventory has a public constructor that accept arguments for itemname, quantity and price and sets their values.

Class Inventory has a public function getValue() that returns the dollar value of the inventory. It also has a public function getItemName() that returns the name of the item.

Create an array of 6 elements that are objects of the class Inventory. Sort this array ascending by dollar value of inventory for each item and display the sorted array with the name of each item and the dollar value of the inventory.

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!