Design an ?Inventory? class that can hold information for an item in retail store?s inventory. The class
Fantastic news! We've Found the answer you've been seeking!
Question:
Design an ?Inventory? class that can hold information for an item in retail store?s inventory. The class should have the following private member variables
The class should have the following public member functions.
Write a program with an object of Inventory class. Ask user to enter the cost, quantity and number of the item and display the total cost of the item in inventory. Validate the user inputs to ensure that negative values are not accepted for item number, quantity, or cost. This program should use a separate validation function ?getNonnegNum? to ask user to enter a non-negative value. If negative number is entered, ?getNonnegNum? function must ask the user to enter it again, until the number entered is non-negative.
Related Book For
Posted Date: