Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thanks! Problem 2 Overview: In this question you will write a program that reads a .csv file with up to 100 ines and stores the

image text in transcribed
image text in transcribed
Thanks!
Problem 2 Overview: In this question you will write a program that reads a .csv file with up to 100 ines and stores the information in an amay of structs and aso writes the lines whose gpa is greater than a minimum value to a output csv fle. Each line of the input file corresponds to a struct element in the array. Then you willallow the user to print the contents of the array Specifics: 1. Your program should handle up to three command ine arguments: the name of a csv file to read, name of the output eav fle and a minimum gpa a Input and output files need to be stored in the same directory as your progran b You can use the fie named "data csv" as an input fle, on Moode, or create your own if you prefer c. Each line in the files must follow the format SGPA,SAGE> of the students, whose GPA> is more than the minimum gpa (read as a command line argument) into a 5. Write a function named addUser to perform the folowing operations: a The addUser function has the I length: Number of itens currently stored in the array Void adduser(User users. string usernane, loat epa, intage, int length b. Instaniate a struct and store the USERNAME, GPA, AGE values in it c. Add the struct to the users array 6. Wnite a function named printList to pertorm the following operations a printList function has the folowing signature: / length: Nmber of items in the array void printlist(const User users[, int length) b. Loop through the populated aray G. Print out each element of the list in the following format USERNAME> GPAIage: [KGPA age: using the below cout statement C. CSCI 2270 Data Structures Instructors: Shayon Gupta, Ashutosh Trivedi, Maciej Zagrodzki Assignment 1, January 2019 sid: :cout user. username SGPA,SAGE> of the students, whose GPA> is more than the minimum gpa (read as a command line argument) into a 5. Write a function named addUser to perform the folowing operations: a The addUser function has the I length: Number of itens currently stored in the array Void adduser(User users. string usernane, loat epa, intage, int length b. Instaniate a struct and store the USERNAME, GPA, AGE values in it c. Add the struct to the users array 6. Wnite a function named printList to pertorm the following operations a printList function has the folowing signature: / length: Nmber of items in the array void printlist(const User users[, int length) b. Loop through the populated aray G. Print out each element of the list in the following format USERNAME> GPAIage: [KGPA age: using the below cout statement C. CSCI 2270 Data Structures Instructors: Shayon Gupta, Ashutosh Trivedi, Maciej Zagrodzki Assignment 1, January 2019 sid: :cout user. username

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions