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...
-
What is meant by the need to make trade-offs between cost, performance, and schedule? Give examples.
-
A company has hired 12 new employees, and must assign 8 to the day shift and 4 to the night shift. a. In how many ways can the assignment be made? b. Assume that the 12 employees consist of six men...
-
Hunter Corporation issued a \(\$ 100,000,61 / 2 \%, 10\)-year bond payable. Journalize the following transactions for Hunter. Include an explanation for each entry. a. Issuance of the bond payable at...
-
Winter Lips produces a lip balm used for cold-weather sports. The balm is manufactured in a single processing department. No lip balm was in process on May 31, and Winter Lips started production on...
-
Below are departmental income statements for a guitar manufacturer. The company classifies advertising, rent, and utilities as indirect expenses. The manufacturer is considering eliminating its...
-
Use the data in COUNTYMURDERS to answer this question. Use only the year 1996. The variable murders is the number of murders reported in the county. The variable execs is the number of executions...
-
What is Balancer Torque T2 AB=1600 mm BD=850 mm OA=800 mm O4B=1750 mm BC=2800 mm O4D=1000 mm 12500 N 300 mm A 60 2 7500 N C 1500 mm
-
How many grams of each of the following per kilogram of water inyour car radiator are needed to give equal protection againstfreezing down to -10.0 Degrees Celcius. A: Methy Alchohol ( CH3OH) Boiling...
-
Turner plc is expected to earn 5.14 a share in the next year and projected to pay 36% of earnings as dividend. The CFO of Turner plc has forecasted that the earnings would grow at 8.5% per year over...
-
How you would apply coaching in the healthcare work environment. How might a coaching leadership style apply to your current work role? What are the advantages and disadvantages of this style in...
-
Everything that is illegal is unethical (breaking the law is unethical), but not everything unethical is illegal. What would be an example of "unethical but not illegal" and, why, generally, are...
-
Describe the marketing exchange relationship between United Way of Greater .Explain with examples.
-
Data: Coffee type: Sumatra "Dark Roast", Mass of water: 600 gram, Mass of beans: 40 grams, Rbrew: 15, pH of coffee at end of brew:6.3 (This is the pH at time=0). Time (minutes) pH Time (minutes) pH 0...
-
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?
-
Derive the frequency equation for the longitudinal vibration of the systems shown in Fig. 8.28. M p. A, E.1 p.A. E,I M k p. A. E,I ell M k (a) (b) FIGURE 8.28 Bar with different end conditions. (c)
-
Fill in the Blank. The ____________ energy of a beam is denoted by \(\frac{1}{2} \int_{0}^{l} E I\left(\frac{\partial^{2} w}{\partial x^{2}} ight)^{2} d x\).
-
A thin bar of length \(l\) and mass \(m\) is clamped at one end and free at the other. What mass \(M\) must be attached to the free end in order to decrease the fundamental frequency of longitudinal...
Study smarter with the SolutionInn App