Question: Write a grading program for a class with the following grading policies. a. There are four quizzes, four lab performances, one midterm exam and one
Write a grading program for a class with the following grading policies.
a. There are four quizzes, four lab performances, one midterm exam and one final exam, each graded on the basis of 100 points.
b. The final exam counts for 40% of the grade, the midterm counts for 30%, and the quizzes together and lab performances together count for a total of 15%.
The program will first ask the lecturer the number of the students. It then reads in each of the students scores and output the students numeric score for the entire course. The program will display the average of the quizzes, lab performances, midterms and finals and the total score before it terminates.
A session with the program might look like this:
Enter the number of students:
2
Enter the student id: 111
Enter the student's average grade for all quizes: 100 Enter the student's average grade for all labs: 80 Enter the student's grade for midterm: 100
Enter the student's grade for final: 70
The average score for this student is 85.000
-------------------------------
Enter the student id: 222
Enter the student's average grade for all quizes: 90 Enter the student's average grade for all labs: 100 Enter the student's grade for midterm: 70
Enter the student's grade for final: 100
The average score for this student is
-------------------------------
Average quiz score = 95.00,
Average lab score = 90.00,
Average midterm score = 85.00,
Average final score = 85.00,
This course's average score = 87.25
Specifications:
1. The program should be built around an array of structures, with each structure containing information of a students record, including ID, average quiz scores, average lab performance scores, midterm score, and final score (all scores are of type int)
89.500
2. The program should have a loop that continues as long as the number of students.
3. You should achieve the functionality of the system by implementing the details of the functions whose prototypes are given below.
// inserts each student's information to the struct and calculates the average score for the student
void insert (struct test_result *);
// calculates the class average using the struct and the number of students
void average_finder(struct test_result *, int ogrSayisi);
HINT: Since you dont know the student number at the beginning of your code, you can use malloc which is in stdlib.h library. The C library function void *malloc(size_t size) allocates the requested memory and returns a pointer to it.
Note: I need the solution in C++ Language please !
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
