|Program modification - the Fire Analogy|
A fire correspond to a modification of a class. We are interested in limiting the consequences of the fire. In the world of OOP, encapsulation and visibility control have the same effect as firewalls in a large building.
A minor modification of a program may spread as a fire throughout the program.
Such a fire may ruin most of the program in the sense that major parts of the program may need to be reprogrammed.
A house - with firewalls - on fire. The fire is not likely to spread to other apartments because of the solid firewalls.
The use of firewalls prevents the spread of a fire.
Similarly, encapsulation and visibility control prevent program modifications from having global consequences.
Read more about the firewall analogy in the text book version of this material.