Design a modular solution, using a structure chart , and then write a C program based on the structure chart solution that solves the following question. Show the flow of data on your structure chart; in the program, this is achieved by parameter passing and function return data.  Data for your program comes from an input file called infile.txt. Each line in the data file has a person’s first name (one word) and an age (separated by a space). There can be up to 10 lines in the data file, and there may be names that are the same (in this case, it can be assumed that the record is for that same person). An example of one line is:   Tony 30  Your program reads the data into a data structure, which consists of an array of records (i.e. array of C structs). Thus, the program would need to define a suitable struct, and create an array of these structs.   Once the data is read in and stored in the data structure the program closes the input file, and then determines if there are any repeated names in the data structure. If there are repeated names, the name and age of the repeated records should be displayed once per person to the screen (just as recorded in the input file above). If there are no repeated records, ‘no repeats’ is displayed to the screen.  Finally, the program will write the data stored in the data structure to a csv (Comma Separated Value) file; the output file should be named outfile.csv. Each record in the data structure will be written to the file on a separate line. A line format will be the same as was in the input file, with the exception that a comma (instead of a space) will separate the fields of each record. There must be NO records containing repeated names in outfile.csv.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Provide me with original solution do not copy paste i will dislike if you do so.

Design a modular solution, using a structure chart , and then write a C program based on the structure chart solution that solves the following question. Show the flow of data on your structure chart; in the program, this is achieved by parameter passing and function return data. 

Data for your program comes from an input file called infile.txt. Each line in the data file has a person’s first name (one word) and an age (separated by a space). There can be up to 10 lines in the data file, and there may be names that are the same (in this case, it can be assumed that the record is for that same person). An example of one line is:  

Tony 30

 Your program reads the data into a data structure, which consists of an array of records (i.e. array of C structs). Thus, the program would need to define a suitable struct, and create an array of these structs.  

Once the data is read in and stored in the data structure the program closes the input file, and then determines if there are any repeated names in the data structure. If there are repeated names, the name and age of the repeated records should be displayed once per person to the screen (just as recorded in the input file above). If there are no repeated records, ‘no repeats’ is displayed to the screen.

 Finally, the program will write the data stored in the data structure to a csv (Comma Separated Value) file; the output file should be named outfile.csv. Each record in the data structure will be written to the file on a separate line. A line format will be the same as was in the input file, with the exception that a comma (instead of a space) will separate the fields of each record. There must be NO records containing repeated names in outfile.csv

Expert Solution
steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY