chapter 3, constructors and inheritance