October 2021
Intermediate to advanced
336 pages
9h 16m
English
This chapter covers
In chapter 2, we discussed the advantage of localizing invariants. We have already done that when introducing classes because they pull together functionality concerning the same data and thereby also pull invariants closer and localize them. In this chapter, we focus on encapsulation—limiting access to data and functionality—such that invariants can only be broken locally and therefore are much easier to prevent.
At this ...
Read now
Unlock full access