Question: /** A student who is taking quizzes. */ public class Student { private String name; private double totalScore; private int quizCount; public Student (String n)

/** A student who is taking quizzes. */ public class Student { private String name; private double totalScore; private int quizCount; public Student (String n) { name = n; totalScore = 0; quizCount = 0; } public String getName() } return name; } public void addQuiz)int score) { totalScore = totalScore + score; quizCount = quizCount + 1; } public double getToalScore() { return totalScore; } public double getAverageScore() { return totalScore / quizCount: } } 

Questions needing answering related to this code:

1) How many instance variables does this class contain?

2)Which variable in the constructor is being updated by a parameter?

3)How many methods are there in this class

4)How many methods are 'mutators'?

5)What do you think the primary purpose is of this class?

6)Write the java method call that would add a quiz score of 95?

7)Which methods do/does not return a value?

8)If we wanted each score to count two times, which method needs to be modified?

9)Can quiz scores with decimals be entered?

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!