Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Student { private static final int NUM _ EXAMS = 4 ; private String firstName; private String lastName; private int gradeLevel; private double
public class Student
private static final int NUMEXAMS ;
private String firstName;
private String lastName;
private int gradeLevel;
private double gpa;
private int exams;
private int numExamsTaken;
Constructor
public StudentString fName, String lName, int grade
firstName fName;
lastName lName;
gradeLevel grade;
exams new intNUMEXAMS;
numExamsTaken ;
Implement this method!
Returns the sum of the differences between exams
Example: Assume exams
Improvement
public int getExamImprovement
your code goes here!
public String getName
return firstName lastName;
public void addExamScoreint score
examsnumExamsTaken score;
numExamsTaken;
This is a setter method to set the GPA for the Student.
public void setGPAdouble theGPA
gpa theGPA;
This is a toString for the Student class. It returns a String
representation of the object, which includes the fields
in that object.
public String toString
return firstName lastName is in grade: gradeLevel;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started