Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Construct a C++ grading program for a class with the following grading policies:

ID: 3877884 • Letter: C

Question

Construct a C++ grading program for a class with the following grading policies:-

a. There are two quizzes, each quizzes is worth 10 points.

b. There is one mid semester test and one final test, each is worth 100 points.

c. The final test accounts for 50 percent of the grade, the mid semester test accounts for 25 percent of the grade and the two quizzes together count for another total 25 percent.

Grading system is as follows:-

>90                                        A

>=80 and <90                        B

>=70 and <80                        C

>=60 and <70                        D

<60                                        E

The program should read in the student's scores and output the student's record, which consists of two quiz and two exam scores as well as the student's average numeric score for the entire course and the final letter grade. Define and use a structure for the student record.

Use these functions to create the program.

void ENTER(S& st); // Asks the user to input for one student and sets the structure variable members.//

void A(S& st); //use this to determine the numeric average and letter grade.//

void R(const S st); //outputs the student record.

Sample Output:-

Sample data for the test run:-

1 7 10 90 95

2 9 8   90 80

3 7 8   70 80

4 5 8   50 70

5 4 0   40 35

Output:

input student #: 1

input the two quiz scores

7 10

Input midsemester test and final test scores

90 95

input student #: 2

input the two quiz scores

9 8

Input midsemester test and final test scores

90 80

input student #3

input the two quiz scores

7 8

Input midsemester test and final test scores

70 80

input student # 4

input the two quiz scores

5 8

Input midsemester test and final test scores

50 70

input student # 5

input the two quiz scores

4 0

Input midsemester test and final test scores

40 35

Record for student # : 1

Quiz scores : 7 10

Midsemester test and final test scores: 90 95

Average: 91.25

Letter grade earned is A

Record for student #: 2

Quiz Scores: 9 8

Midsemester test and final test scores: 90 80

Average: 83.75

Letter grade earned is B

Record for student #: 3

Quiz Scores: 7 8

Midsemester test and final test scores: 70 80

Average: 76.25

Letter Grade earned is C

Record for student: 4

Quiz Scores: 5 8

Midsemester test and final test scores: 50 70

Average: 63.75

Letter Grade earned is D

Record for student #: 5

Quiz Scores: 4 0

Midsemester and final test scores: 40 35

Average: 32.5

Letter Grade is earned is F

Explanation / Answer

As per your requirement the below one is solution please follow it

//Code:

#include<iostream>

using namespace std;

struct S{

int quiz1;

int quiz2;

int mid;

int final;

}st;

void ENTER(S& st){

cout<<"input the two quiz scores: ";

cin>>st.quiz1>>st.quiz2;

cout<<"Input midsemester test and final test scores: ";

cin>>st.mid>>st.final;

}

double A (S& st){

int quizsum=st.quiz1*10+st.quiz2*10;

double quizeavg= double(quizsum*.25)/2;

double midsum= double(st.mid)*.25;

double finsum= double(st.final)*.5;

double finalavg=quizeavg+midsum+finsum;

// cout<<finalavg;

return finalavg;

}

void R(S& st){

double grade= A(st);

cout<<"Quize Scores: "<<st.quiz1<<" "<<st.quiz2<<endl;

cout<<"Mid Semester test and Last semester test Scores: "<<st.mid<<" "<<st.final<<endl;

cout<<"Average: "<<grade<<endl;

if(grade>=90){

cout<<"Letter Grade earned is A";

}else if(grade<90 && grade>=80){

cout<<"Letter Grade earned is B";

}else if(grade<80 && grade>70){

cout<<"Letter Grade earned is C";

}else if(grade<70 && grade>=60){

cout<<"Letter Grade earned is D";

}else if(grade<60 && grade>=50){

cout<<"Letter Grade earned is D";

}else if(grade<50 && grade>=40){

cout<<"Letter Grade earned is E";

}else if(grade<40){

cout<<"Letter Grade earned is F";

}

}

int main(){

ENTER(st);

A(st);

R(st);

}