Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

Question What are the requirements for a safe harbor 401(k) plan?30

Answered: 1 week ago