Chapter 10. Designing and Writing Custom Classes
In Chapter 9 I initiated a discussion about designing your own classes. I ended that chapter by designing and writing a simple class named clsDates that added two methods: getLeapYear() and getEaster(). This chapter continues the theme of class design, but gets into additional details about writing classes. In this chapter you will learn about:
Getters and setters
Changing the state of an object
Sensing an error in a class method
When you finish this chapter, you will have a solid foundation upon which to start writing your own classes. With a little effort, I think you'll find that it is both worthwhile and kind of fun.