Programming Practice

Each student takes the following six courses:

Course

Credit Hours

C Programming for Engineering

3

Analytical Genometry and Calculus

3

Mechanics 

3

Mechanics Laboratory

1

General Chemistry

3

General Chemistry Laboratory

1

A student record contains (1) his/her identification which is an English letter seven digits, (2) stuents's name which is first name and last name with each of maximum length 20 characters, and (3) scores of the six courses, each score is an integer between 0 and 100. Write a C program to read student data from text file student_score.txt. Compute and output the student records with student averages, course averages, and the class average. The student average is computed with the credit hours as the weight of each course as below:

.

The course average is the total scores of that course divided by the number of students and the class average is total student averages divided by the number of students. Testing data of student records in student_score.txt are shown as below:

ID Name C Programming
for Engineering
Analytical
Genometry
and Calculus
Mechanics   Mechanics
Laboratory
General
Chemistry
General
Chemistry
Laboratory
D0570308 Bill Green 80 75 64 78 83 65
D0562065 Suasn Peterson 92 85 80 95 82 88
D0570312 Mary Brownson 65 50 75  62 58 65
D0550182 Peter Holland 83 67 72 65 83 72
D0570331 Peter Fitzgerald 77 68 52 55 75 63
D0570314 John Smith 50 62 55 78 64 64
D0550122 Paul Wang 85 76 85 88 90 84
D0550125 Bob Whitening 71 77 79 83 65 62
D0570352 Becky Candie 65 62 74 80 69 75
D0562099 Wendy Mostly 78 54 62 55 75 60
D0562081 David Parker 84 72 50 58 69 55
D0550110 Henry Quincy 77 52 82 63 58 68

Execution example: