Exercise 9: defined new method to print students by cohort (requires editing)