SE450: Encapsulation: Encapsulation and Abstraction [14/47] Previous pageContentsNext page

Encapsulation is about hiding details -- the details are not accessible outside the unit of encapsulation.

Large organizations function because not everyone needs to know every detail all the time -- they break down when too many people need to know too much.

For example, Math.random():double computes a pseudo-random number, but the details are hidden.

Code provider versus client programmer.

The provider's code is encapsulated. The client sees an abstraction.

Previous pageContentsNext page