Chapter 4 exercises: variables and objects