chapter 12. classes and dynamic memory allocation