getGradeAndClass function implemented.