chapter 6 exercise 6-8: classifying students by predicate