Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ Problem 2 Overview: In this question, you will write a program that: 1. Reads a .csv file with 5 columns and up to

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedIN C++

Problem 2 Overview: In this question, you will write a program that: 1. Reads a ".csv" file with 5 columns and up to 10 lines containing information on student grades. 2. Stores the information in an array of structs. 3. Writes the lines into the output.csv file where the overall student grade is between a particular range. 4. Prints the content of the entire array. Specifics: Create an array that holds the studentData struct objects. Use the following struct declaration: struct studentData { string studentName; int homework; int recitation; int quiz; int exam; double average; }; 2A. Write a function named addStudentData: i. The addStudentData function has the following declaration: // length: Number of items currently stored in the array void addStudentData(studentData students[], string studentName, int homework, int recitation, int quiz, int exam, int length); ii. Instantiate a struct and store the studentName, homework, recitation, quiz, and exam values in it. iii. Assume equal weights amongst everything that needs to be graded. Take the average of the homework, recitation, quiz, and exam for each respective student and store it in the struct. a. student.average = (homework + recitation + quiz + exam)/4; iv. Add the struct to the students array. 2B. Write a function named calcLetter: i. The calcLetter function has the following declaration: char calcLetter(double avg); ii. Write IF-ELSE conditions to assign letter grades based on the following a. >=90: A b. 80-89.9: B c. 70-79.9: C d. 60-69.9: D e. earned which is a(n) " cout ,, (as shown in the sample output) of the students whose is >= lower_bound and

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

2. Identify and choose outcomes to evaluate a training program.

Answered: 1 week ago