Skip to content

Instantly share code, notes, and snippets.

@woprzech
Created June 1, 2017 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woprzech/968547fbc9de2ee2ddff9dd2534813b8 to your computer and use it in GitHub Desktop.
Save woprzech/968547fbc9de2ee2ddff9dd2534813b8 to your computer and use it in GitHub Desktop.
public class GradesService {
private final Gradebook gradebook;
public GradesService(Gradebook gradebook) {
this.gradebook = gradebook;
}
Double averageGrades(Student student) {
return average(gradebook.gradesFor(student));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment