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

Implement a class Student. A student has a name and a total quiz score. Supply a

ID: 670478 • Letter: I

Question

Implement a class Student. A student has a name and a total quiz score. Supply an appropriate constructor, and methods getName(), addQuiz(int score), getTotalScore(), and getAverageScore(). To compute the latter, also need to store the number of quizzes that the student took. Modify the student class to computer grade point averages. Methods are needed to add a grade and get the current GPA. Specify the 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 method that translates grades into their numeric values (for example, “B+” becomes 3.3).

Explanation / Answer

class Student{
   string name;
   int totalQuizScore;
   int totalQuiz;
   public string getName(){
       return name;
   }
   public void addQuiz(int score){
       totalQuizScore += score;
       totalQuiz++;
   }
   public int getTotalScore(){
       return totalQuizScore;
   }
   public double getAverageScore(){
       return totalQuizScore/totalQuiz;
   }
  
}

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