Classes and Objects 04 Flashcards
1
Q
How does the use of private and public access modifiers assist encapsulation?
A
Private access modifiers are used to help classes hide there internal data representation.
While the implementation details are now hiden the class provides a public interface that allows users to modify/access the internal state.
2
Q
What does encapsulation do?
A
It ensure object’s are self contained and reusable.