What is the Rule of Thumb on Exposing Encapsulated Class Methods
- by javamonkey79
Consider the following analogy:
If we have a class: "Car" we might expect it to have an instance of "Engine" in it. As in: "The car HAS-A engine". Similarly, in the "Engine" class we would expect an instance of "Starting System" or "Cooling System" which each have their appropriate sub-components.
By the nature of encapsulation, is it not true…