Abstraction in c++:
To represent the essential feature without including the background detail. Data abstraction is a programming technique which relies on the separation of implementationand interface. E.g Monitor of Computer, we do not know the internal detail of monitor who its work.
Accessing Labels of Abstraction: –
• Members defined with a public section are accessible to all parts of the program. The data-abstraction view of a type is defined by its public members.
• Members defined with a private section are not accessible to code that uses the class. The private sections hide the implementation from code that uses the type.
Benefits of Abstraction:
There are two important advantages of Data abstraction: –
• Class internals are protect from inadvertent user-level errors, which might corrupt the state of the object.
• The class implementation may be evolve over time in response to changing requirements or bug reports without requiring change in user-level code.