Question
You are the owner of a hardware store and need to keep an inventory that can tell you what different tools you have, how many
You are the owner of a hardware store and need to keep an inventory that can tell you what different tools you have, how many of each you have on hand and the cost of each one. The data is organized as follows:
? The first column contains the tool name
? The second column contains the quantity of that product in inventory.
? The third column contains the cost per item or unit price of that product.
Use the following information to start your file:
Hammer 76 11.99
Jigsaw 21 14.99
Wrench 10 4.49
Write a C++ program that will do the following:
? Read data from a data file you create called hardware.dat located on the hard drive. The inventory changes occasionally, so you do not know how much data there is to process.
? Call a function that will return the total value of the stores inventory for any one particular product (unit price * number of items).
? Compute the total number of items in the inventory.
? Print the output to a file you create called hardware.out to display the results. The output in that file should be displayed as follows (make sure you include the necessary headings that are shown below):
show the output in the file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started