CourseOfferings class has the first hashtable you listed
StudentRecords class has second
course class has the third one
and student class has the fourth one
I have 8 classes in total with 3 packages, controller , view class model. theirs 3 classes in the controller 1 in view and 5 in model
was talking to a class mate and they said that
this already sets the grade into the has table, this is in the course class
public Enrollment grade(String RUID, String grade){
Enrollment g = (Enrollment) enrollments.get(RUID);
g.setGrade(grade);
return null;
does it seem right?
Here is my course class
String index;
String name;
// store roster list
Hashtable enrollments= new Hashtable();
public Course(String index, String name){
this.index = index;
this.name = name;
}
public String getIndex() {
return index;
}
public String getName() {
return name;
}
// add an enrollment to roster list
public Enrollment addEnrollment(Enrollment e) {
//put enrollment in hashtable
enrollments.put(e.getCourse(), e );
return e;
}
// remove an enrollment from roster list
public Enrollment removeEnrollment(String RUID) {
enrollments.remove(RUID);
return null;
}
// assign a grade to a student through
// roster list
public Enrollment grade(String RUID, String grade){
Enrollment g = (Enrollment) enrollments.get(RUID);
g.setGrade(grade);
return null;
}
}