How many instance variables does this class contain which


/** 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?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: How many instance variables does this class contain which
Reference No:- TGS02931480

Expected delivery within 24 Hours