Project Extra Credit

Due: 12 Dec

Requirements Specification

Write the C code for recording and performing statistics on student grades. Use functions and arrays to do this project.

Your program should do the following:

  1. There are total 10 different grades per student. 4 quizzes, 4 projects and 2 exams. Maximum grade for each is 100.
  2. The maximum no. of students in the class can be 20.
  3. Each student is identified by a unique 4 digit number.
  4. The program will print the grade table for the class as well as compute and print statistics for the given grades.
  5. The input is to be read from an input file which gives the number of students in the class (<= 20) and all the grades.
  6. The quizzes are worth 5% each, projects are worth 10%each and exams are worth 20%each in the final grade.
  7. Letter grades are: A above 90, B for 80 to 89, C for 70 to 79, D for 60 to 69 and F for less than 60.
  8. Use functions that you need to do this project. Don't do all the work in main. You will lose 50% of the grade if you do that.
  9. Use only one and two-dimensional arrays to do this project.


Name the source code file: projEC.c

Submission

Email the source file (the .c file) as an attachment to the TA at dipesh1@umbc.edu.

The subject of the email should be "CMSC104 Section 0701 ProjectEC". This must be an exact match for the TA to be able to filter the mail and put your work in the correct folder! Write your name, last four digits of your social security number and your section number in the body of the email. Please follow all this instructions and make sure that you have met them before sending the email. Don't send a copy to me. You will lose points if you don't follow the instructions.

Example Output

SSN   Quiz1   Quiz2   Quiz3   Quiz4   Proj1   Proj2   Proj3   Proj4   Exam1   Exam2   Avg.    Grade
1023       90         93          45         78     100        89         95        50          90            92         89.10        B
4532       67         65          89         89       90        34          0           0           24            32         39.10        F
7542       98         80          99         95       94        89        100      100         96            92         94.50       A
8532       56         67          87         84      100      100        89        43          67            87         78.70       C
Max       98         93          99         95      100       100      100      100         96            92
Min        67         65          45         78        90         34          0           0          24            32
Avg      77.75   76.25    80.00   86.50  96.00    78.00   73.75  48.25    69.25       75.75
 

-- For taking input from an input file use UNIX redirection.
-- Create a file that contains all the grades. Then compile your code. Run the following command 'a.out < grade_filename'.
-- Don't put printf's in the code that prompt the user for input because it is coming from a file. Only print a table similar to the example output.
-- While you are writing your program, you could ask for data from the keyboard. But, the final version of your program should not ask the user for data.
-- You should remove any statements that ask the user for data so that they are not printed to the screen by your final version.
-- Use the input file similar to the one shown below. This is  the input file for the sample output.
-- The first line gives the number of students in the class (4 in this case). Next comes the SSN for the first student (1023) followed by his 10 grades.
-- Then the SSN (4532) for the next student and his grades and so on for all the students.
-- The output should not all print the scores for 20 students but only for the number of students specified in the input file.

Input file for the Example Output
4
1023
90
93
45
78
100
89
95
50
90
92
4532
67
65
89
89
90
34
0
0
24
32
7542
98
80
99
95
94
89
100
100
96
92
8532
56
67
87
84
100
100
89
43
67
87

Program Header Comment Block

Use the following comment block at the beginning of your source code:
/* 
** Filename:       projEC.c
** Name:           Your name
** SSAN:           Last four digits of your SSN   
** Date:           Date of submission
** Course:         CMSC-104 Section XXX 
** Description:    (Your psuedocode goes here.  Must be detailed)
** Notes:          (As needed, such as how to compile)
*/


You will lose points if you don't follow the instructions for the Header Comment Block.