Encapsulation is one of the most important aspects of object-oriented programming (OOP).
The rule of encapsulation is one of keeping things private or masked inside the domain
of an object, package, namespace, class, or interface and allowing only expected access
to pieces of functionality.
Encapsulation allows OOP programmers to think and program in an object oriented manner.
Savvy OOP programmers, with the proper use of encapsulation, can build patterns like
facades, proxies, bridges, and adapters. These patterns can hide with an interface or class structure functionalities that the
programmer does not wish to be publicly / globally known.