Chapter 15: | How to Enforce Abstraction Using Protected and Private Variables and Methods |
In Chapter 13, you learned that constructor, getter, and setter instance methods help you to benefit from data abstraction. In this chapter, you learn how to ensure that all instance-variable accesses and assignments are channeled through such instance methods.