Question: Also need a Grade class. In C++ please 5. Complete the following: Implement a class Student. For the purpose of this exercise, a student has

Also need a Grade class. In C++ please
5. Complete the following: Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply an appropriate constructor and functions get_name(), add_quiz(int score), get_total_score(), and get_average_score(). To compute the latter, you also need to store the number of quizzes that the student took. Modify the Student class compute grade point averages. Member functions are needed to add a grade, and get the current GPA. Specify grades as elements of a class Grade. Supply a constructor that constructs a grade from a string, such as "B+". You will also need a function that translates grades into their numeric values (for example, "B+" becomes 3.3). For this assignment, you should have separate .h and.cpp files for the objects. Use the following student.h,grade.h, student.cpp and grade.cpp files for example code. student.h 1 #ifndef STUDENT_H 2 #define STUDENT_H 3 4 class Student 5 { 6 public: 7 Student (); 8 void print_grades (); 9 ); 10 11 #endif 5. Complete the following: Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply an appropriate constructor and functions get_name(), add_quiz(int score), get_total_score(), and get_average_score(). To compute the latter, you also need to store the number of quizzes that the student took. Modify the Student class compute grade point averages. Member functions are needed to add a grade, and get the current GPA. Specify grades as elements of a class Grade. Supply a constructor that constructs a grade from a string, such as "B+". You will also need a function that translates grades into their numeric values (for example, "B+" becomes 3.3). For this assignment, you should have separate .h and.cpp files for the objects. Use the following student.h,grade.h, student.cpp and grade.cpp files for example code. student.h 1 #ifndef STUDENT_H 2 #define STUDENT_H 3 4 class Student 5 { 6 public: 7 Student (); 8 void print_grades (); 9 ); 10 11 #endif
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
