Implement log files or simple database applications

Assignment Help Software Engineering
Reference no: EM131708483

Software Systems Assignment

Files and Pointers

A CSV file, Comma Separated Vector, is a file format normally used to implement log files or simple database applications. It is a text file that uses the .csv file extension. Every row of the file is a series of fields separated by commas and terminating with a carrage return. For example, we have a phone book of friends: Bob is 19 his number is 514-123-4567, and Mary is 20 her number is 450-345-7890. This would be stored in the CSV file as:

Bob, 19, 514-123-4567

Mary, 20, 450-345-7890

The comma and the carrage return are reserved words and cannot be used in the file to mean anything else. In CSV2, escape characters are used to overcome this limitation, but for this assignment we are not implmenting CSV2. It is optional to include a space after the comma.

A CSV record is one row of information. For example: Bob, 19, 514-123-4567 is a record. In this case, it is populated by three fields, deliniated by the comma and carrage return: field #1 is Bob, field #2 is 19, and field #3 is 514-123-4567. It is standard to refer to the contents of a CSV file as records and fields.

Create a program that does the following:

1) Ask for a name

2) Ask for a replacement name

3) Search for the record in the CSV file that belongs to name 1

4) Load that record into an array of size 1000 characters

5) Using pointers and no library functions and no array indexes, properly replace the name in the record with the replacement name

6) Then write this updated record back into the CSV file replacing the old record

7) Program terminates

In the above, steps 1 - 2 are in the main function.

Steps 3 - 4 are in a function called void FindRecord(char *filename, char *name, char record[]), it is invoked from the main function. FindRecord opens the file and reads each record looking for the matching record name. It then returns the matching record in the array record[] and closes the file.

Step 5 is in a function called void Replace(char *name, char *newname, char record[]), it is invoked from the main function. It replaces the name in the array record[] with newname. The updated information is returned through the array record[]. You must use pointers.

Step 6 is in a function called void SaveRecord(char *filename, char *name, char record[]) and it is invoked from the main function. SaveRecord replaces the record in CSV that matches name with the array record[]. It then closes the file. The entire CSV file must be preserved as in its original form escept the one record that is replaced.

Do not use global variables.

Using vim, create a csv file called phonebook.csv and populate it with 5 records. Each record will be formatted as: name, age, phone_number.

Your C program is called Replace.c.

Reference no: EM131708483

Questions Cloud

Discuss perceive as having power recognize themselves : Do you think that those individuals who we perceive as having power recognize themselves that they have that power over others
Create a project viewpoint capital budget : Create a project viewpoint capital budget and a parent viewpoint capital budget. What do you conclude from your analysis?
Create functions for each body parts ex function torso : Create functions for each body parts ex: function torso for torso drawing. The only drawing primitive will be glutWireCube.
Define who is more unethical: men or women : Who is more unethical: Men or women? Younger folks or older folks? Experienced negotiators or inexperienced ones
Implement log files or simple database applications : COMP 206 Software Systems Assignment. A CSV file, Comma Separated Vector, is a file format normally used to implement log files or simple database applications
Weighted average cost of capital for doohicky devices : Doohicky expects the Malaysian ringgit to appreciate 2.0% per year against the dollar, and the Philippine peso to depreciate 5.0% per year against the dollar.
Discuss selling personal information to third parties : Explain the ethical aspects of selling personal information to third parties for purposes of creating products to sell back to the patients
What is the maximum us dollar price finisterra should offer : Finisterra, S.A. Finisterra, S.A., located in the state of Baja California, Mexico, manufactures frozen Mexican food which enjoys a large following in the U.S.
Discuss ethical and environmental issue in purchasing : Sustainability is an important ethical and environmental issue in purchasing. Describe one material, product, or service that can contribute

Reviews

len1708483

11/6/2017 3:38:41 AM

Do not use global variables. Using vim, create a csv file called phonebook.csv and populate it with 5 records. Each record will be formatted as: name, age, phone number. Your C program is called Replace.c. WHAT TO HAND IN - Submit your .c file and your .csv file to myCourses. HOW IT WILL BE GRADED - Points removed for bad practices: for not following instructions, for not indenting, spacing, and/or commenting and for not using good variable names.

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd