Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Help me!! This is C language, not C++. Project Overview: In this project, you will implement a set of functions that can be used

Please Help me!!

This is C language, not C++.

image text in transcribed

image text in transcribed

image text in transcribed

Project Overview: In this project, you will implement a set of functions that can be used to retrieve information from a CS100 grade book stored in a CSV (comma-separated values) file. The CSV file consists of 47 columns as shown below. The first two columns are always the first name and the last name. The order of the columns are unknown, and they can be in any order 45 L1 through L10 for 10 labs. Q1 through Q11 for 11 quizzes. E1 through E8 for 8 exams (tracing and coding are considered as two different exams) First Name and Last Name. B1 through B10 for 10 textbook exercises. P1 through P6 for 6 projects. The first row (or line) of the CSV file is the header, i.e. column names. Each following row represents a student. The first name and the last name in each row will not be blank or contain a space. Each score under the 45 headings will be either blank (with no score) or a real number. A blank score is considered as 0 in some calculations and is ignored in the others. You are asked to implement the following five functions in the functions.c file. double getMin (char csvfile, char column [)Given a CSV file, return the minimunm score of the specified column. The blank cells are excluded from the calculation. double getMax (char csvfile, char columnGiven a CSV file, return the maximunm score of the specified column. The blank cells are excluded from the calculation. double getAvg (char csvfile, char column [)Given a CSV file, return the average score of the specified column. The blank cells are excluded from the calculation. int getCount (char csvfile[], char column[], double threshold); Given a CSV file, return the number of students with their specified score >threshold. The blank cells are excluded from the calculation. double getGrade (char csvfile[,char first, char last) Given a CSV file, return the weighted average of the specified student. A blank cell is viewed as 0 in the calculation. The weight percentage for each column is specified below. The lowest quiz score will be dropped from the calculation. Column L1 through L10 O1 through O11 B1 through B10 P1 through P6 Weight Percenta 1% for each lab 1% for each quiz 1% for each exercise 2% for P1 4% each for P2, P3 5% each for P4, P5, P6 5% for each exam 7.5% for each exam Score Ran 0-100 0-10 0-100 0-100 E1 through E6 E7, E8 0-50 0-75 When implementing the above functions, you can assume csvfile is a valid CSV file and it can always be opened for reading, and column is a valid column name. You can also assume there is at least one non-blank score in each column. In addition, you are allowed to add additional helper functions in the functions.c file. We recommend you use the fgets function to read a line from the CSV file, and use the strsep function to extract each field from the line. You can assume that each line does not exceed 300 characters in length and each field does not exceed 30 characters in length. It is not recommended to use the strtok function to extract each Project Overview: In this project, you will implement a set of functions that can be used to retrieve information from a CS100 grade book stored in a CSV (comma-separated values) file. The CSV file consists of 47 columns as shown below. The first two columns are always the first name and the last name. The order of the columns are unknown, and they can be in any order 45 L1 through L10 for 10 labs. Q1 through Q11 for 11 quizzes. E1 through E8 for 8 exams (tracing and coding are considered as two different exams) First Name and Last Name. B1 through B10 for 10 textbook exercises. P1 through P6 for 6 projects. The first row (or line) of the CSV file is the header, i.e. column names. Each following row represents a student. The first name and the last name in each row will not be blank or contain a space. Each score under the 45 headings will be either blank (with no score) or a real number. A blank score is considered as 0 in some calculations and is ignored in the others. You are asked to implement the following five functions in the functions.c file. double getMin (char csvfile, char column [)Given a CSV file, return the minimunm score of the specified column. The blank cells are excluded from the calculation. double getMax (char csvfile, char columnGiven a CSV file, return the maximunm score of the specified column. The blank cells are excluded from the calculation. double getAvg (char csvfile, char column [)Given a CSV file, return the average score of the specified column. The blank cells are excluded from the calculation. int getCount (char csvfile[], char column[], double threshold); Given a CSV file, return the number of students with their specified score >threshold. The blank cells are excluded from the calculation. double getGrade (char csvfile[,char first, char last) Given a CSV file, return the weighted average of the specified student. A blank cell is viewed as 0 in the calculation. The weight percentage for each column is specified below. The lowest quiz score will be dropped from the calculation. Column L1 through L10 O1 through O11 B1 through B10 P1 through P6 Weight Percenta 1% for each lab 1% for each quiz 1% for each exercise 2% for P1 4% each for P2, P3 5% each for P4, P5, P6 5% for each exam 7.5% for each exam Score Ran 0-100 0-10 0-100 0-100 E1 through E6 E7, E8 0-50 0-75 When implementing the above functions, you can assume csvfile is a valid CSV file and it can always be opened for reading, and column is a valid column name. You can also assume there is at least one non-blank score in each column. In addition, you are allowed to add additional helper functions in the functions.c file. We recommend you use the fgets function to read a line from the CSV file, and use the strsep function to extract each field from the line. You can assume that each line does not exceed 300 characters in length and each field does not exceed 30 characters in length. It is not recommended to use the strtok function to extract each

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

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions