I am trying to make a constructor that creates an array of empty homework scores (6 per student) and an array of empty exam scores (3 per student).
The getHomeworkAverage() method returns the average score on the student’s homework. The getFinalScore() method returns the final grade for each student using the grading as follows: (15% for exam1, 25% for exam2, 30% for exam3, and 30% for the homework average).
public class Student {
private String name;
private int[] homeworks;
private int[] exams;
private int[] homeworkScores;
private int[] examScores;
private double homeworkAvergae;
private int finalScore;
public Student(String name, int[] homeworks, int[] exams, int[] homeworkScores, int[] examScores, double homeworkAvergae, int finalScore) {
this.name = name;
this.homeworks = homeworks;
this.exams = exams;
this.homeworkScores = homeworkScores;
this.examScores = examScores;
this.homeworkAvergae = homeworkAvergae;
this.finalScore = finalScore;
}
public int[] getHomeworkScores() {
return homeworkScores;
}
public void setHomeworkScores(int[] homeworkScores) {
this.homeworkScores = homeworkScores;
}
public double getHomeworkAvergae() {
return homeworkAvergae;
}
public int[] getExamScores() {
return examScores;
}
public void setExamScores(int[] examScores) {
this.examScores = examScores;
}
public int getFinalScore() {
return finalScore;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int[] getHomeworks() {
return homeworks;
}
public void setHomeworks(int[] homeworks) {
this.homeworks = homeworks;
}
public int[] getExams() {
return exams;
}
public void setExams(int[] exams) {
this.exams = exams;
}
}