Sunday, 22 January 2017

Features of Object Oriented Programming

In Object Oriented Programming (OOP), more emphasis is given to the data rather than functions. In OOPs, Data is encapsulated with the associated functions that operate on it. That gives rise to a concept called Data Encapsulation. In OOPs, the real-life problem can be decomposed into a number of entities called Objects and then data and functions built around these objects.

Data Encapsulation is the mechanism whereby the implementation details of a class are kept hidden from the user. It is sometimes referred to as data hiding. The user can only perform a restricted set of operations on the hidden members of the class by executing special functions. The advantages of using data encapsulation comes when the implementation of the class changes but the interface remains the same. The concept of data encapsulation is supported in C++ through the use of public, protected and private access modifiers.. https://goo.gl/vTrEGE

No comments:

Post a Comment