00:01
Hello viewers, in this question we have to write a grading program that will read students ' score and output the student numeric score for entire course.
00:09
The program will display the average of all quizzes test and the total scores.
00:14
So to write the program we need a program plan as first we need to include header files.
00:22
Then we need to define constants such as first constant is name.
00:32
Underscore length of size 50.
00:38
Then we need to define another constant that is stu underscore length of size 100.
00:48
Then we need to define function prototypes.
00:54
Then to store the student record we need to define a structure with name result that that has corresponding variables to store all the records of the students including the test grades, queues grades, midterms and final exam grads.
01:19
Then we need to define a function name read record.
01:26
That is used to read records lines.
01:30
Then we need to define another function name insert record.
01:35
That is used to insert the student record in the structure.
01:42
Then we need to define another function named numeric record.
01:48
That will print the numeric score of entire course for a particular student name.
01:56
Then we need to define another function name final average.
02:04
That will display the average of all quizzes, tests.
02:08
And the total course score.
02:13
Then we need to define main method or main function to call all the functions and related variables to input students record and display the corresponding average of all quizzes test and total scores.
02:32
Now let us move to the code editor for the complete code.
02:37
The complete code is shown here as in the code editor.
02:42
Here it first includes the header file that is studio .h and c -type .h.
02:48
Then it defined the constant name underscore length with size 50, stood underscore length with size 100.
02:57
Then it defined the function prototypes such as read record, insert record, numeric score, final average.
03:04
Then it defined a structure for a student name result.
03:09
Having variable name of character type, number of integer type, grade 1 of integer type, grade 2 of integer type, midterm of integer type, final of integer type, numeric of flow type and an object name student with length stood underscore length.
03:28
Then it defined a main function of integer type that has a variable code of character character type and num underscore students of integer type and initialized number school students to zero.
03:44
Then it first called insert record by passing num underscore students as input parameter to insert the record of first student and then print the numeric score of the first students by calling numeric score print function by passing num underscore students as parameter.
04:04
Then it iterated the loop for the next students.
04:08
That first asks, would you like to enter another record? if user press y, then it insert the record and display the corresponding numeric score for the particular student.
04:21
If the user press n, then it display the final average of all tests, all quizzes and the total or entire grade of the courses by using switch case...