Question: Given the following class definition: public class Student { private int studentID; private String name; private Schedule schedule; private int gradePoints; private int numberOfCredits; public

Given the following class definition:

public class Student { private int studentID; private String name; private Schedule schedule; private int gradePoints; private int numberOfCredits; public student(String name, int ID) { this.name = name ; studentID = ID; } public double getGPA() { // <<< your code from previous question >>> } private double calculateGPA() { // (double) in the next line of code 'casts' (forces) gradePoints to be a type double in this line // of code so that the division will return a real number instead of an int double gradePointAverage = (double)gradePoints/numberOfCredits; return gradePointAverage; } // more code }

You are now working in a new class called Registrar and the following code hsa been written. Complete the line of code calculating the average GPA and

write the javaDocs that explains what the method does and private documentation explaining how the method works

public class Registrar { // some more fields here // a constructor here // some methods here public double calculateAverageGPA( Student student1, Student student2, Student student3) { // <<< your code here >>> } // more methods }

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!