Question: Can someone tell me how to do this cpp question I copied the needed txt file : bad games.txt: john smith#165980076#8148337965#3rd & state st#erie#pa#16506 martin

Can someone tell me how to do this cpp question
I copied the needed txt file :
bad games.txt:
john smith#165980076#8148337965#3rd & state st#erie#pa#16506
martin gardner#164905543#4403542700#5244 heisley rd#mentor#oh#44123
sarah vendetti#164879987#3302541122#29 millhaven st.#akron#oh#44532
judy golumbiewski#194409976#7163347654#6187 fillmore ave#rochester#ny#07654
terry merz#193976554#8002435799#19876 elm avenue#manchester#mo#63166
kenisha jones#198432265#9193610419#902 east taylor rd#apex#nc#27709
phil yee#176409976#6308602682#1976 wacker drive#chicago#il#60191
jean caron#167453321#9738874700#1429 delben street#whippany#nj#07981
sandy alicea#176419006#3054428202#12 la habana east#miami#fl#33134
rob williams#206337765#3342715450#9854 fremont blvd#montgomery#al#36109
jancy hilfiger#201876987#8148817654#3012 state st#pittsburgh#pa#15011
 Can someone tell me how to do this cpp question I

Instructions As one of your first programming assignments at Mega Industries, you have been tasked with writing a program to read a file of names and addresses which was extracted from an obsolete system and display it in the new format. Many of the fields need to be edited. Atypical line in the old file would be: john smith# 165980076 8148337965 3rd & state stieriet pat 165065 it needs to be reformatted to: Smith, John, 165-98-0076, 814-833-7965,3rd & State St ,Erie, PA, 16506 After consulting with a senior programmer, you are suggested to organize your program with following functions: string fixName (string n); //takes in the name and returns it in the right format string fixSSN (string ss) //Fixes SSN string fix Phone (string ph) Fixes phone number string ress (string addr //Fixes fixAdd address string fixCity (string cty) Fixes city string fixstate (string st) Fixes state string extractField (string &s); Extracts a field (eg name) from the input string and then deletes //it and the octothorpe that follows it. The extracted field is //returned. Notice string s is passed by reference void buildLine (string &s, string field) Concatenates field and a comma to string The final result will be displayed like: Smith, John,165-98-0076,814-833-7965,3rd & State St,Erie,PA,16506 Gardner, Martin, 164-90-5543, 440-354-2700,5244 Heisley Rd, Mentor, OH,44123 Vendetti,Sarah,164-87-9987,330-254-1122,29 Millhaven St., Akron,OH,44532

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!