chapter 9 dynamic class and method