Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is difference between Data Abstraction and Data Encapsulation?

0
Posted

What is difference between Data Abstraction and Data Encapsulation?

0

Data Abstraction and Data Encapsulation are both Object Oriented Programming (OOPS) Concepts. Encapsulation is the hiding of internal complexity and Abstraction is the presentation of simple concept (or object) to the external world. Abstraction uses in order to do some works easierly. For example, you have a abstract class fruit. And fruit has some methods one of which has to be abstract. So you should fill the body of this method’s body for your each class who are subclass of this abstract class. The purpose of it is that to implement method according to that class. Abstraction is the process of hiding the details and exposing only the essential features of a particular concept or object. Encapsulation is the ability of an object to be a container (or capsule) for related properties (ie. data variables) and methods (ie. functions). Programs written in older languages did not enforce any property/method relationship. This often resulted in side effects where variables had their conten

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123