Question: solve the functions // function.c #include #include #include #include #include // Given a gradebook file, return the minimum of the specified column, excluding unavailable scores

![unavailable scores double getMin(char filename[], char column[]) { return 1.1; } //](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4f8ac0926a_47566f4f8ab9209d.jpg)

![unavailable scores double getMax(char filename[], char column[]) { return 2.2; } //](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4f8ad5f551_47666f4f8acc3cea.jpg)

![unavailable scores double getAvg(char filename[], char column[]) { return 3.3; } //](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4f8aef2810_47866f4f8ae6352b.jpg)

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 text file (Please download an example gradebook file named case 11.bxt and use Visual Studio Code to view the structure of the file.) The gradebook file contains a sequence of printable characters and it is structured as a table, with the help of newlines and tabs. The table contains exactly 32 columns, and the column names are shown below. First and Last for first name and last name L1 through L10 for 10 labs B1 through B10 for 10 zyBooks exercises P1 through P6 for 6 projects E1 through E4 for 4 exams. The first two columns are always the first name and the last name The order of the remaining 30 columns is unknown. The first line of the file is the header line and it is a list of column names separated by tabs Each following line represents a student. The number of students in the file is unknown either Each student has exactly 32 fields separated by tabs. The first two fields are the first and last names of the student The first and last names can contain up to 30 letters, and no two students have the same full name. Each student has 30 score fields and their values are either a double ranging from 0 through 100, or na (for not available). An unavailable score is viewed as O in one function and is excluded in the other computation functions. You are asked to implement the following five functions in the functions.c file double getMin(char filenamell, char column []); Given a gradebook file, return the minimum of the specified column, excluding unavailable scores double getMax (char filenamell, char column []); Given a gradebook file, return the maximum of the specified column, excluding unavailable scores double getAvg (char filenamell, char column []); Given a gradebook file, return the average of the specified column, excluding unavailable scores int getCount(char filename ], char column [], double threshold); Given a gradebook file return the number of students with their column value >= threshold, excluding unavailable scores double getGrade(char filenamel], char first!), char last[]); Given a gradebook file, return the weighted average of the specified student or -1.0 if there is no such student. An unavailable score is viewed as 0 The weight percentage for each column is specified below. Column Weight Percentage Score Range L1 through L10 1% for each lab 0-100 B1 through 110 1% for each zyBooks exercise 0-100 P1 through P6 2% for P1 5% each for P2, P3 6% each for P4, P5, P6 0-100 E1 through E4 10% each for E1, E2, E3 20% for E4 0-100 When implementing the above functions, you can assume the column name is always valid, and the gradebook file can always be opened for reading. The gradebook file always follows the table structure described above. You can also assume there is at least one actual score in each column. You are allowed to add some helper functions in functions.c. For example, it is probably helpful to find the column number from a given column name by searching the column name in the header line, and you can write a helper function to perform the searching. Based on the column number, you may want to retrieve the column value from a student line, and you can write another helper function to achieve it. Sample Execution $ ./a.out casell.txt Enter a command: min B1 min (B1)=10.7 Enter a command: min P3 min (P3) = 7 Enter a command: max 15 max (B5) 100 Enter a command: max P4 max (P4)-100 Enter a command: avg E4 avg (E4) -87.913 Enter a command: avg 17 avg (L7)=97.7955 Enter a command: count E4 100 count (E4>=100)=14 Enter a command: count E4 60 count (E4>60) 44 Enter command: count 14 100 count (L4>100)-26 Enter a command: count 14 90 count (L4>90)-31 Enter a command: grade Louanne Fisch grade (Louanne Fisch)-68.437 Enter a command: grade Stormy Beaufort grade (Stormy Beaufort)=79.463 Enter a command: quit #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
