Subscribe to our newsletter. Data Abstraction is the process of defining user types and using these types only through a set of interface operations instead of directly manipulating their representations. Encapsulation also called information hiding refers to a technique in which data is packaged together with the operations that act on it such that the data can be manipulated only through these operations and not directly.
Object oriented languages have special language mechanisms to support data abstraction.
Such an encapsulated type is called a Class . Class declarations include data and the member functions that operate on the data. The specifiers Private and Public control access to the members of the class from outside the class. Private members are available only to member functions of the same class. Public members are available to any function.