chapter 7 exercises: classes