Encapsulation Construct & Naming Encapsulation
Encapsulation Construct & Naming Encapsulation
PRESENTATION BY:
S.NAINJEETH KOUR
22321A1254
ENCAPSULATION :
Encapsulation is defined as binding together the data and the functions
that manipulate them.
Benefits:
• Data Protection
• Increased Security
• Code Reusability
• Improved Maintainability
ENCAPSULATION CONSTRUCTS
When the size of program reaches beyond reaches a few thousand lines,
we have 2 problems:
Encapsulations are often placed in libraries and made available for reuse
in programs other than those for which they were written.
ENCAPSULATION IN C: 4
Namespace in C++
Packages in Java
7
NAMESPACE IN C++ :
One can place each library in its
own namespace and qualify the
names in the program with the
name of the namespace when the
names are used outside the
namespace.