Write a grading program for the following grading policies:-
a. There are two quizzes, each graded on the basis of 10 points.
b. There is one midterm exam and one final exam, each graded on the basis of 100 points.
c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 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.
Utilize these function prototypes:-
void input(StudentRecord * student); //should prompt for input for one student and set the structure variable members.
void computeGrade(StudentRecord * student); //use this to calculate the numeric average and letter grade.
void output(const StudentRecord student); //outputs the student record.
Write a grading program for the following grading policies:-
a. There are two quizzes, each graded on the basis of 10 points.
b. There is one midterm exam and one final exam, each graded on the basis of 100 points.
c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 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.
Utilize these function prototypes:-
void input(StudentRecord * student); //should prompt for input for one student and set the structure variable members.
void computeGrade(StudentRecord * student); //use this to calculate the numeric average and letter grade.
void output(const StudentRecord student); //outputs the student record.
I’ve done all the testing and fixed the code. You can see the output.
Code:
#include <iostream>
#include <iomanip>
using namespace std;
struct StudentRecord{
double q1, q2;
double midterm, final;
double avg;
char grade;
};
//should prompt for input for one student and set the structure variable members.
void input(StudentRecord * student);
//use this to calculate the numeric average and letter grade.
void computeGrade(StudentRecord * student);
//outputs the student record.
void output(const StudentRecord student);
int main()
{
StudentRecord student;
input(&student);
computeGrade(&student);
output(student);
return 0;
}
void input(StudentRecord * student)
{
cout << "Please Enter marks for Quiz 1: ";
cin >> student->q1;
while(student->q1 < 0 || student->q1 > 10)
{ cout << "Must be between 0 and 10. Enter again: ";
cin >> student->q1;
}
cout << "Please Enter marks for Quiz 2: ";
cin >> student->q2;
while(student->q2 < 0 || student->q2 > 10)
{ cout << "Must be between 0 and 10. Enter again: ";
cin >> student->q2;
}
cout << "Please Enter marks for midterm: ";
cin >> student->midterm;
while(student->midterm < 0 || student->midterm > 100)
{ cout << "Must be between 0 and 100. Enter again: ";
cin >> student->midterm;
}
cout << "Please Enter marks for finals: ";
cin >> student->final;
while(student->final < 0 || student->final > 100)
{ cout << "Must be between 0 and 100. Enter again: ";
cin >> student->final;
}
}
void computeGrade(StudentRecord * student)
{
double p1 = (((student->q1 + student->q2) / 2) * 10) * 0.25;
double p2 = student->midterm * 0.25;
double p3 = student->final * 0.5;
student->avg = p1 + p2 + p3;
if (student->avg >= 90.0)
student->grade = 'A';
else if (student->avg >= 80.0)
student->grade = 'B';
else if (student->avg >= 70.0)
student->grade = 'C';
else if (student->avg >= 60.0)
student->grade = 'D';
else
student->grade = 'F';
}
void output(const StudentRecord student)
{
cout << endl;
cout << setw(25) << left << "Quiz 1: " << student.q1 << endl;
cout << setw(25) << left << "Quiz 2: " << student.q2 << endl;
cout << setw(25) << left << "Midterm: " << student.midterm << endl;
cout << setw(25) << left << "Finals: " << student.final << endl;
cout << setw(25) << left << "Average: " << student.avg << endl;
cout << setw(25) << left << "Grade: " << student.grade << endl;
}

Output:

Write a grading program for the following grading policies:- a. There are two quizzes, each graded...
In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, each graded on the basis of 100 points. c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 25 percent. Grading system is as follows:-...
Write a grading program in Java for a class with the following grading policies: There are three quizzes, each graded on the basis of 10 points. There is one midterm exam, graded on the basis of 100 points. There is one final exam, graded on the basis of 100 points. The final exam counts for 40% of the grade. The midterm counts for 35% of the grade. The three quizzes together count for a total of 25% of the grade....
using if/switch statements (C++) Write a grading program for a class with the following grading policies: There are two quizzes, each graded on the basis of 10 points There is one midterm exam and one final exam, each graded on the basis of 100 points The final exam counts for 50% of the grade, the midterm counts for 25% and the two quizzes together count for a total of 25%. (Do not forget to normalize the quiz scores. They should...
c++
implement a student class
Determine the final scores, letter grades, and rankings of all
students in a course.
All records of the course will be stored in an input file, and a
record of each student will include the first name, id, five quiz
scores, two exam scores, and one final exam score.
For this project, you will develop a program named cpp to determine the final scores, letter grades, and rankings of all students in a course. All...
Write a c++ program to compute and print the grade for one student. The grade is based on three mid-term exams (worth a possible 25 points each) of which the best two are only considered in the computation, two quizzes (5 points each), and a 40 points final exam. Your output should include all scores (2 best midterms, 2 quizzes and the final exam), the percentage grade, and the letter grade. Solve it using nested if. The grading scale is:...
Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might be worth 40% of your final grade. To calculate the grade for the Assignments category, the teacher takes the percentage earned on the assignments and multiplies it by the weight. So if the student earned a 90% total on the Assignments, the teacher would take 90% x 40, which means the student earned a 36 percent on the Assignments section. The teacher then calculates...
Java Program: In this project, you will write a program called GradeCalculator that will calculate the grading statistics of a desired number of students. Your program should start out by prompting the user to enter the number of students in the classroom and the number of exam scores. Your program then prompts for each student’s name and the scores for each exam. The exam scores should be entered as a sequence of numbers separated by blank space. Your program will...
Write a program that will calculate your letter grade at the end of the semester for CSIS130. Your program will read an input file that shall contain all the tests scores and lab scores for the semester, and the input file data should be in the following format: full name of student Test1 Score (0…100), Test2 Score (0..100) , Final Exam Score (0..100), Total Number of Labs: N NLab Scores (0=Fail, 1=Pass) [You will have N lab scores each separated...
Write a program called printGPA. The program should contain at least 3 methods: main, gradeAverage, and letterGrade. The user will type a line of input containing the student's name, then a number that represents the number of scores, followed by that many integer scores (user input is in bold below). The data type used for the input should be one of the primitive integer data types. Here are two example dialogues: Enter a student record: Maria 5 72 91 84...
Write a program to calculate your final grade in this class. Three(8) assignments have yet to be graded: Quiz 7, Lab 7 and Final Project. Assume ungraded items receive a grade of 100 points. Remember to drop the lowest two quiz scores. Display final numeric score and letter grade. Implementation: Weight distribution is listed in canvas. Use arrays for quizzes, labs, projects and exams. You are allowed to use initialization lists for arrays. Use at least three (3) programmer defined...