Question: Need help on C++. Write a code with the following task. Database file provided. The program will need to be setup to be able to

Need help on C++. Write a code with the following task. Database file provided. The program will need to be setup to be able to check slightly different files as well.

//Prompt the user for the database file name. This file name is the path and the file name. Do not assume the file is in a particular directory. Use a single prompt.

//Open the database

//Read in the records using a custom class to hold a record

//Remove the duplicates

//Write the scrubbed database as a new CSV file starting with 'new_' and the input database file name.

//Write the new file to the same directory that the database file was read from.

Suggestion: Create a class to hold a single data record.

Override the == operator to ease comparison and override the << operator to output the comma separated values.

Use the class constructor to receive a line from the database then parse the values or override the >> input operator.

Modify the string stream getline() delimiter to a comma.

Duplicated.csv

1,A,13107-070,257,2.71

2,B,66389-0001,948,94.43

3,C,53808-0776,278,65.75

4,D,41250-416, 203,36.95

5,E,64058-413,783,45.65

6,F,64092-113,450,55.23

7,C,53808-0776,278,65.75

8,G,0268-1154,976,65.17

9,E,64058-413,783,45.65

10,Z,68788-9852,362,56.57

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!