Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Sheridan College Page 1 of 4 PROG20799: Assignments N3 Winter 2020 PROG20799: Data Structures and Algorithms in C Final Project Evaluation: 10 points, 15% of your final grade. Due date: See SLATE....

1 answer below »
Sheridan College Page 1 of 4
PROG20799: Assignments N3 Winter 2020
PROG20799: Data Structures and Algorithms in C
Final Project

Evaluation: 10 points, 15% of your final grade.
Due date: See SLATE.
Late submission: final project must be submitted by due date/time.

This project is to be done in groups of one or two students.
You must enroll in a group on SLATE even if you do the project by yourself!

In this project, you are required to develop a record-keeping application by using data
structure concepts learned during this course. In this project, except for csv parser, you are
not allowed to use any external li
aries. All the data structures used in this project must be
implemented by you.


The record-keeping application

In the .csv file each line represents a single record with the following attributes:
Social Insurance Number (SIN), First Name, Last Name, Annual Income
https:
en.wikipedia.org/wiki/Comma-separated_values

1. Your application should store the records in the text file in the csv format.
2. Your application should be able to read and parse csv file.
3. Your application should store the records read from the file in the heap memory using the
appropriate data structure to perform the following 5 basic operations:
• List: display all the records in the file.
• Sort: display all the records in ascending or descending order based on a particular attribute.
• Find: find and display a record that contains attribute with a specific value.
• It must be the “exact” case-insensitive match. No partial matches!
• The user has to specify the attribute used to find the records.
• Add: add a new record.
• Delete: delete an existing record by giving an attribute value.

Each basic operation must load records from the file and save them in the new file (if asked).
This means that each basic operation is independent and can/should have it’s own data
structure. Find, Add and Delete operations can have subsequent operations.

The main goal of this project is to encourage you to think about which data structure(s) should
e selected in order to support the required basic operation. For instance, displaying records
can be implemented using an a
ay of pointers or a single linked list. However, a
ay of
pointers will be inefficient for other operations such as deleting or finding a record.

The application must have a console interface (front end that represents the application).
You must use modular design. Do NOT put all the functions in the main.c file. See Hints!


https:
en.wikipedia.org/wiki/Comma-separated_values

Sheridan College Page 2 of 4
PROG20799: Assignments N3 Winter 2020
For instance, the workflow for “Sort” operation:

File to load records from: records.csv
Please select:
1. List records
2. Sort records
3. Find records
4. Add record
5. Delete record
Please select operation: 2
Please select sort by attribute (1=SIN, 2=First Name, 3=Last Name, 4=Annual Income): 3
Please select order (1=Ascending, 2=Descending): 1
Loading data from records.csv file … 4 records loaded
Displaying records sorted by Last Name in ascending order:
XXXXXXXXXXMaria A
ot XXXXXXXXXX
XXXXXXXXXXDavid Borne XXXXXXXXXX
XXXXXXXXXXRichard Johnson XXXXXXXXXX
XXXXXXXXXXRichard Smith XXXXXXXXXX
Save displayed records in the file (press Enter to skip): output.csv
Data saved in the file output.csv

For “Find” operation you need to find the exact match for specified attribute.
Note: it’s possible to find matched records when you load the records. Don’t do it! Instead,
you must load the data first and then perform the search. It’s more efficient for all subsequent
searches.

For instance, the workflow for “Find” operation:

File to load records from: records.csv
Please select:
1. List records
2. Sort records
3. Find records
4. Add record
5. Delete record
Please select operation: 3
Please select the attribute (1=SIN, 2=First Name, 3=Last Name, 4=Annual Income): 2
Please provide the first name you want to find: Alex
Loading data from records.csv file … 4 records loaded
Displaying record(s) with First Name “Alex”:
No records found!
Please provide the first name you want to find (press Enter to skip): Richard
Displaying record(s) with First Name “Richard”:
XXXXXXXXXXRichard Johnson XXXXXXXXXX
XXXXXXXXXXRichard Smith XXXXXXXXXX
Please provide the first name you want to find (press Enter to skip):
Save displayed records in the file (Enter to skip):
Data was not saved.

Note: assume all subsequent “find” operations will be performed on the same attribute.

Sheridan College Page 3 of 4
PROG20799: Assignments N3 Winter 2020
For “Add” operation you might be tempted to simply add the record at the end of the file. Will
this be efficient? The workflow for “Add” operation might look like this:

File to load records from: records.csv
Please select:
1. List records
2. Sort records
3. Find records
4. Add record
5. Delete record
Please select operation: 4
Adding new record:
SIN: 11
Inco
ect SIN. Please try again.
SIN: XXXXXXXXXX
First Name:
First Name cannot be empty!
First Name: Richard
Last Name: Smith
Annual Income: 22350
Add another record (Y/N) ? Y
Adding new record:
SIN: XXXXXXXXXX
First Name: Maria
Last Name: Sharapova
Annual Income: XXXXXXXXXX
Add another record (Y/N) ? N
Save all records in the file (Enter to skip): records.csv
File records.csv already exist. Do you want to ove
ide it? (Y/N): Y
Data saved in the file records.csv

You need to do basic validations: SIN must be 9 digits; first/last name cannot be empty, etc.
In general, the application workflow should be as follows:
- Display a list of operations to choose from (List, Sort, Find, Add, and Delete).
- Ask for attribute and/or value (for Sort, Find, and Delete).
• For sorting you need to provide “sort by” attribute (SIN, First Name, etc)
• For deletion you need to find record(s) to be deleted first. You need to ask the
attribute to be used to find the record(s) and specific value of that attribute.
- For the chosen operation load the data using the appropriate data structure.
- Perform the operation and display the result (if applicable)
- Repeat operation (“Add”) or repeat with the same attribute (“Find” and “Delete”).
- Ask for confirmation to save the records (if applicable).
- Save the data in the new file or confirm ove
iding the old file (if applicable).
• “List” operation doesn’t need confirmation (data not saved)!

“Delete” operation works similarly to “Find” operation except records are deleted.
Except for “List” operation, your application should offer to save displayed or modified records
in the new file or ove
ide the existing file (with confirmation).

Sheridan College Page 4 of 4
PROG20799: Assignments N3 Winter 2020
Hints:
1. Each record should be represented by a structure when loaded from .csv file.
2. “Find” operation must be fast. You might want to sort records when you load them.
“Insertion Sort” used in Assignment N3 has time complexity O(n) to add a new record to a sorted
linked list. Can you do it faster than O(n) ?
3. In the Final Project you must use modular design. Do NOT put all functions inside main.c Instead,
add all functions in the separate file (for instance, functions.c) and use the co
esponding header
file (for instance, functions.h). See Exercise 2.3

Project Code:
You must export the project (in NetBeans) and save it as final_project.zip file

Project Report:
A simple PDF file final_project.pdf must be provided that includes:
- Description of the data structure(s) used for each operation.
- The reason(s) for choosing each of these data structures.

Project Demo:
Using screen capturing software (like Microsoft Expression encoder) you must record a demo
version of your application and upload demo.mp4 file to the Dropbox.

You can create a demo video using, for instance, Microsoft Expression Encoder:
https:
www.microsoft.com/en-ca/download/details.aspx?id=18974
Expression Encoder Screen Capture creates a .xesc video file that can be uploaded to
YouTube and then download from YouTube as .mp4 file.

Submission:
Even partially copied code from anywhere will be subject to regulations against academic integrity.
You must provide links (references) to any 3rd party code used in your application.
Posting this assignment and/or solution on the Internet is a violation of the academic integrity policy.
• Only one student in the group must submit all the files to the Assignment Dropbox.
• Please make sure your code is POSIX-compliant (works in NetBeans/Cygwin)!
• Upload final_project.zip, final_project.pdf and demo.mp4 to the Dropbox.
• Please self-evaluate and self-grade your code in the comments section of the Dropbox.
• Late submissions are not accepted for the final project.
Grading Scheme:
• See Main requirements and also Course_Introduction.pdf.
Deductions will be applied if partial functionality is provided.
• You’ll get zero grade if your code doesn’t compile.
• Any compilation warning is a major mistake.
• "Debugging code" or commented out "old code" is a minor mistake.
https:
www.microsoft.com/en-ca/download/details.aspx?id=18974
    PROG20799: Data Structures and Algorithms in C
Answered Same Day Mar 26, 2021

Solution

Neha answered on Mar 30 2021
147 Votes
outputs/output.jpeg
outputs/output1 (1).jpeg
outputs/output1 (2).jpeg
outputs/output1 (3).jpeg
outputs/output1 (4).jpeg
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here