Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago