Ok, so Accessor Methods are methods that allow you to access the Class Variables or whatever. And Mutator Methods are methods that allow you to change variables.
So, in your code above, you have several Class Variables:
private String name;
private String address;
private int age;
private double mathGrade;
private double englishGrade;
private double scienceGrade;
private double average;
private static int studentCount;
And you have several methods made for you.
These methods are Accessor Methods:
public String getName(){
studentCount++;
return name;
}
public double getAverage(){
double result = 0;
result = ( mathGrade+englishGrade+scienceGrade )/3;
return result;
}
public static int getStudentCount(){
return studentCount;
}
And these methods are Mutator Methods:
public void setName( String name ){
this.name = name;
}
public void setMathGrade( double mathGrade ){
this.mathGrade= mathGrade;
}
public void setEnglishGrade( double englishGrade ){
this.englishGrade= englishGrade;
}
public void setScienceGrade( double scienceGrade ){
this.scienceGrade= scienceGrade;
}
Do you understand that?
So, you still need to create the Accessor and Mutator methods for the variables that do not have either or one. You should have a total of at least 16 methods when you are done (if I understand your assignment). 8 Accessor methods for each variable (or attribute) and 8 Mutator methods for each variable (or attribute).