1.10 Basics of Object-oriented Programming
1.5.7 Elements of OOP: Encapsulation
By now we understand that object mean attributes and functionality. Class can contain several
instances of an object.
We also understand that object-oriented programming is a data primacy language, that is,
data is important and functions are not so important. As per memory mapping used in OOP
languages, data is stored in data area such as stack and free space, functions are stored in code
area and there is a need to maintain strict control over the accessing of data by functions.
OOP languages achieve this control by using encapsulation feature. Encapsulation is binding
member data and calling function together with security classification, so that no unauthorized ...