encapsulation and data hidingthe property of


Encapsulation and Data Hiding

The property of being a self-contained unit is known as encapsulation. The idea that the encapsulated unit can be used without knowing how it works is known as data hiding.

Encapsulation is the principle by which related contents of a system are being together. It minimizes traffic among different parts of the work and it divides certain specific requirements from other parts of specification, which use those requirements.

The significant advantage of using encapsulation is that it helps minimize rework when developing a new system. The part of the work, which is prone to change, can be encapsulated together. Thus any changes can be made without affecting the overall system and as changes can be easily incorporated.

As noted before, when an engineer requires adding resistor to the device she is creating, she doesn't typically build a new one from the scratch. She walks over to a bin of resistors, examines the bin of resistors, examines the colored bands that show the properties, and picks the one she requires. The resistor is a "black box" as far as the engineer is concerned - that is, she doesn't care how it does its work as long as it conforms to her specifications.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: encapsulation and data hidingthe property of
Reference No:- TGS0309330

Expected delivery within 24 Hours