Question: You will implement a Student class for this exam. A student class has a name (string), and a list of grades (double). Use a vector

You will implement a Student class for this exam. A student class has a name (string), and a list of grades (double). Use a vector to store the student grades. Supply the appropriate constructors and methods as follow:

1. Write a default constructor for the Student class. Initialize the name to an empty string (""). 2. Overload the constructor with a name as parameter. 3. Write a Get and a Set method for the student's name. 4. Write a AddQuiz method to add a student's grade to the list of grades. 5. Write a GetTotalScores() method to return the total of the student grades. 6. Write a GetAverageScores() to method to return the average of the student's grades. Must re-use GetTotalScores() in your average calculation. 7. Overload a less than operator (<). Use pass by reference for the parameter. Compare the average of two students, i.e., student1 < student2 if the average of student1 is less than the average of student2. 8. Overload a greater-than-equal operator (>=). Use pass by reference for the parameter. Must use the method in #7 to get full credit. Compare the average of two students, i.e., student1 >= student2 if the average of student1 is greater-than-equal the average of student2. 

code in C++ using classes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!