C++ Tutorial Home Page

C++ OOPs Concepts

Introduction
Class
Objects
Abstraction
Encapsulation
Polymorphism
Inheritance
Dynamic Binding
Message Passing

C++ OOPs Concepts 7

Important Exam Question

How does a class enforce data hiding , abstraction and encapsulation?


Since the class members (data and functions) which are private and protected remain hidden from outside world , the public members form the interface by providing the essential and relevant information to the outside world. Thus only the essential features (public members) are represented to outside world, without including the background details (private and protected members) which is nothing but abstraction.