What is the difference between data abstraction and encapsulation?

1 answer

Answer

1261483

2026-08-27 14:10

+ Follow

Data Encapsulation : It is a process of bundling the data, and the functions that use them, as a single unit( atleast in C++) . In C++ the data type "class" is used to achieve this.

Data Abstraction : It is a process of exposing only the interfaces and hiding the implementation details from the user. The interface exposed will remain the same: even if the internal implementation changes. This helps the user to use the new functionality without rewriting the client that was designed for previous implementation (strictly speaking ... previous interface).

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.