0%
0 / 10 answered

Calling Class Methods Practice Test

10 Questions
Question
1 / 10
Q1

Consider the following class for student records. The StudentRecord class has addGrade(double points) and calculateGpa(int numClasses) that returns totalPoints / numClasses. It also has getName() that returns the student name. A program instantiates StudentRecord r = new StudentRecord("Liam"); then calls r.addGrade(9.0). The expected output of calculateGpa depends on the parameter value. If calculateGpa(3) is called, what is the expected result?

Question Navigator