HERE IS HOW THE TXT FILE LOOKS LIKE (it is screen shot since I cannot upload txt
Fantastic news! We've Found the answer you've been seeking!
Question:
HERE IS HOW THE TXT FILE LOOKS LIKE (it is screen shot since I cannot upload txt file)
Transcribed Image Text:
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 Description itemNumber An int that holds the item's number. quantity An int that holds the quantity of the item on hand. cost A double that holds the wholesale per-unit cost of the item The class should have the following public member functions. Member Function Description default constructor 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 set TotalCost function. constructor #2 Introduction to Classes and Objects Member Function Description Accepts an int argument and copies it into the itemNumber member variable. setItemNumber Accepts an int argument and copies it into the quantity member variable. setQuantity Accepts a double argument and copies it into the cost member variable. setCost get ItemNumber Returns the value in itemNumber. getQuantity Returns the value in quantity. getCost Returns the value in cost. get TotalCost Computes and returns the totalCost. Demonstrate the class by writing a simple program that uses it. This program should validate the user inputs to ensure that negative values are not accepted for item number, quantity, or cost. 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 Description itemNumber An int that holds the item's number. quantity An int that holds the quantity of the item on hand. cost A double that holds the wholesale per-unit cost of the item The class should have the following public member functions. Member Function Description default constructor 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 set TotalCost function. constructor #2 Introduction to Classes and Objects Member Function Description Accepts an int argument and copies it into the itemNumber member variable. setItemNumber Accepts an int argument and copies it into the quantity member variable. setQuantity Accepts a double argument and copies it into the cost member variable. setCost get ItemNumber Returns the value in itemNumber. getQuantity Returns the value in quantity. getCost Returns the value in cost. get TotalCost Computes and returns the totalCost. Demonstrate the class by writing a simple program that uses it. This program should validate the user inputs to ensure that negative values are not accepted for item number, quantity, or cost.
Expert Answer:
Answer rating: 100% (QA)
Code Inventoryh pragma once include using namespace std class Inventory private int itemnumber doubl... View the full answer
Related Book For
Fundamental Accounting Principles
ISBN: 978-0078110870
20th Edition
Authors: John J. Wild, Ken W. Shaw, Barbara Chiappetta
Posted Date:
Students also viewed these mechanical engineering questions
-
On the basis of the data shown below: Item Inventory Quantity Cost per Unit Market Value per Unit (Net Realizable Value) IA17 137 $54 $49 O5T4 277 28 30 Determine the value of the inventory at the...
-
Please identify the following input validation checks as protective or detective controls and give an example of each: a. Field check b. Validity check c. Limit check d. range check e. Reasonableness...
-
Prepare the following for April: 1. Revenues budget 2. Production budget in units 3. Direct material usage budget and direct material purchases budget 4. Direct manufacturing labor cost budget 5....
-
Passenger table (passengerid, address etc.) Flight table (flight id, departure, destination, depDate) Booking table (cID, fid, date, cost) a. Find Passengers who live in Chicago b. Total number of...
-
Samples of n = 4 items are taken from a process at regular intervals. A normally distributed quality characteristic is measured and x and s values are calculated for each sample. After 50 subgroups...
-
Microtech Corporation is expanding rapidly, and it currently needs to retain all of its earnings, hence it does not pay any dividends. However, investors expect Microtech to begin paying dividends,...
-
What role does a data control group play in an EDP system?
-
Intercompany Receivables and Payables 1_08 Polychromasia, Inc. had a number of receivables from subsidiaries at the balance sheet date, as well as several payables to subsidiaries. Of its five...
-
6. Consider the parallelogram ABCD where A(0, 1, 2), B(1,2,3), C(0,3,5). [A /4] a. Find the area of ABCD. b. Find ZB in degrees. [2] [2] 7. Find the work done by the force = < -2,3,-5> acting at 57...
-
Omar is leading a weekly workshop series for his peers on how to be a successful student. Each week, he assigns a task for them to try and report back on next session. However, it seems like nobody...
-
A piece of land was purchased for $170 000 five years ago. Its price has increased in line with inflation and its current value is $200 000. Find the average annual inflation rate during this time?...
-
A. Describe each of the three components in the AIM planning process for business messages: audience analysis, idea development, and message structuring. B. Explain the general nature of excellence...
-
Identify the needs of your audience in the AIM planning process.
-
Develop effective slide presentations.
-
Identify how generational, gender, and other aspects of diversity affect workplace communication.
-
Organize and gather content for a preview, view, and review.
-
If you invest $200,000 currently in a project that pays a 7.5% interest rate compounded annually, What is the amount of the investment after four years ?
-
President Lee Coone has asked you to continue planning for an integrated corporate NDAS network. Ultimately, this network will link all the offices with the Tampa head office and become the...
-
What accounts are affected by closing entries? What accounts are not affected?
-
A high proportion of Company Xs total costs are variable with respect to units sold; a high proportion of Company Ys total costs are fixed with respect to units sold. Which company is likely to have...
-
Refer to the annual report for Apple in Appendix A. For the year ended September 26, 2009, what is its debt-to-equity ratio? What does this ratio tell us?
-
The unadjusted trial balance of Innovative Computers Pty Ltd on 30 June 2025 is presented below. The following additional information is available. 1. The inventories as of 30 June 2025 were as...
-
The Z-spread of Bond A is 1.05% and the Z-spread of Bond B is 1.53%. All else equal, which statement best describes the relationship between the two bonds? A. Bond B is safer and will sell at a lower...
-
In most countries, the bond market sector with the smallest amount of bonds outstanding is most likely the: A. government sector. B. financial corporate sector. C. non-financial corporate sector.
Study smarter with the SolutionInn App