Question: I would like this program in c++ with comments please, thanks The purpose of this assignment is to make sure that you know how to

I would like this program in c++ with comments please, thanks

The purpose of this assignment is to make sure that you know how to write a program that uses files and file processing. The program also contains functions and does input, output, flow of control and/or calculations.

PROGRAM SPECIFICATION For the assignment, we will write a program that reads a file of information pertaining to a Farmers Market. The file contains the names of various farms participating in a Farmers Market. The program should create a file object for input, read the data, perform some calculations, create a report, and then rewrite the information to a new output file.The format of the file is as follows:

Field or data item in the file

Data type

Notes

Farm name

String of characters

This could end with a comma

Count of item

Integer

Number of items

Item

String

Name of the item

Item price

Float or double

Unit cost of each item

Download the file (called ASSGN6-A.txt) to examine the contents. You should see that the name of the farm is delimited with a comma, and everything else is delimited with a space. When reading the information into your program, the comma after farm name and the space between each remaining field is consistent and guaranteed. Item is also guaranteed to be one word (so probably dont need a getline). Also, we will not need to validate the information in this program. Valid data is also guaranteed! Your program will read the data items and output them to a report. The count of items should be multiplied by the item price, and that should be shown as well. The format should appear on the screen as follows:

==============================================================

= FARMERS MARKET INVENTORY =

==============================================================

Collins Farm 43900 tomatoes @ .67 each totaling $29413.00

Rutherford Farms, Inc. 809 apples @ .90 each totaling $728.10

Grand total: 999999 items totaling $999999.99

the data to use in the program:

Collins Farm, 43900 tomatoes .67 Bart Smith Farms, 34910 cassavas .99 Allen Farms, 117 coconuts .54 River Run Farm, 103 taros .65 Big Top Farm, 109 artichokes 2.23 Big Top Farm, 777 crosns .28 Big Top Farm, 9739 cucumbers .53 Marble Farm, 108 crosns .33 Food For Life Inc., 106 carrots .87 Food For Life Inc., 86 coconuts .84 Johnson Farms, 121 parsnips .22 A1 Farm, 111 beets .12 A1 Farm, 5591 taros .72 Looney Tunes Farm, 102 onions .49 Wolfe Creek Farm, 103 rhubarbs 1.21 Wolfe Creek Farm, 199 radishes .71 James Farm, 47 pickles .68 Weaver Farms, 75 walnuts 2.50 Weaver Farms, 500 pickles .59 Pore Boy Farms, 670000 peanuts .79 Rutherford Farms Inc., 809 apples .90 Rutherford Farms Inc., 659 pickles .70 Javens Farm, 129000 figs .44 Harrison Farms, 8001 yams 1.09 Setzer Farms Inc., 701 potatoes .89 Setzer Farms Inc., 651 tomatoes .69 Pikes Peak Farm, 1045 turnips .79 Holland Area Farms, 10001 radishes .69 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!