Question: Write a C++ program, which can do the following: 1. Read data from a CSV file (filename comes in from command-line arguments and the file

Write a C++ program, which can do the following:

1. Read data from a CSV file (filename comes in from command-line arguments and the file contains a header row)

2. Select specific rows or columns from the CSV file according to user input

3. Display the number of items in the selected rows/columns

4. Calculate the mean, standard deviation, variance and correlation coefficient of the items in selected rows/columns

Input CAN be any csv file NOT just the sample one posted below!

Sample Input:

Write a C++ program, which can do the following: 1. Read data

Name;Date of Birth;Job;Base salary;Actual salary GeriKilbourne;20/12/1965;Manager;5000;6000 GregCustis;14/08/1968;Manager;4875;5000 JudeBrace;06/12/1987;Consultant;2120;2200 MariselaSunderland;12/08/1985;Consultant;2440;2500 DanyellConiglio;13/01/1985;Consultant;2530;2700 SheilahVeatch;24/12/1990;Consultant;2090;2200 KayeLuz;02/12/1979;Manager;4500;4600 RusselRamaker;24/04/1960;Manager;5160;5200 ShaunaYelverton;04/07/1977;Consultant;2770;3000

Sample Output:

from a CSV file (filename comes in from command-line arguments and the

Data.csv 1 Name: Date of Birth:Job: Base salary:Actual salarY 2 Geri Kilbourne: 20/12/1965;Manager; 5000: 6000 3 Greg Custis: 14/08/1968:Manager; 4875;5000 4 Jude Brace:06/12/1987:Consultant; 2120:2200 5 Marisela Sunderland; 12/08/1985 Consultant 2440:2500 6 Danyell Coniglio;13/01/1985: Consultant:2530:2700 7 Sheilah Veatch:24/12/1990: Consultant: 2090: 2200 8 Kaye Luz; 02/12/1979;Manager 4500:4600 9 Russel Ramaker; 24/04/1960:Manager; 5160 5200 10 Shauna Yelverton: 04/07/1977Consultant; 2770 3000 1 Microsoft Visual Studio Debug Console File is now open! Contains Name;Date of Birth; Job; Base salary Actual salary Geri kilbourne;28/12/1965Manager;5800;6800 Greg Custis;14/88/1968;Manager 4875;588 ude Brace;86/12/1987;Consultant;2120;2280 Marisela Sunderland;12/88/1985Consultant; 2448;2580 Danyell Coniglio;13/e1/1985;Consultant;2530;2788 Sheilah Veatch;24/12/1998;Consultant;2098;2280 Kaye Luz;82/12/1979;Manager 45884688 Russel Ramaker 24/84/1968 Manager;5168;5288 Shauna Yelverton 84/e7/1977;Consultant;2778;380e Which rows/columns do you want to use? (ex. row 1) column 4 Number of records found in column 4:9 records Mean : .eeeeee variance : .eeeeee Standard Deviation : .ee@eee Select columns to calculate Correlation Coefficient! (ex. column 4,5) column 4,5 Correlation coefficient: .08e Press any key to close this window

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!