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

C++ Program help!! Write the definition of a class representing a student record

ID: 3564249 • Letter: C

Question

C++ Program help!!

Write the definition of a class representing a student record:

The student record class should have member variables for all the grading components, namely:

     - 2 quiz scores, graded on the basis of 10 points, weighted at 25%

      - 1 midterm exam, graded on the basis of 100 points, weighted at 25%

      - 1 final exam, graded on the basis of 100 points, weighted at 50%

      - the student

Explanation / Answer

#include using namespace std; class Student{ private: double quiz1; double quiz2; double midExam; double finalExam; double average; public: Student(double quiz1,double quiz2,double midExam,double finalExam){ this->quiz1=quiz1; this->quiz2=quiz2; this->midExam=midExam; this->finalExam=finalExam; } void setQuiz1(double marks){quiz1=marks;} void setQuiz2(double marks){quiz2=marks;} void setMidExam(double marks){midExam=marks;} void setFinalExam(double marks){finalExam=marks;} double getQuiz1(){return quiz1;} double getQuiz2(){return quiz2;} double getMidExam(){return quiz1;} double getFinalExam(){return finalExam;} void calculateAverage(){ average=((quiz1+quiz2)/20*25)+((midExam/100)*25)+((finalExam/100)*50); } friend ostream & operator
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote