Difference between Abstraction and Encapsulation



Difference between Abstraction and Encapsulation


Distinguish, differentiate, compare and explain what is the difference between abstraction and encapsulation. Comparison and Differences.

Difference between Abstraction and Encapsulation

1. Abstraction solves the problem in the design level. Encapsulation solves the problem in the implementation level.

2. Abstraction is used for hiding the unwanted data and giving relevant data. Encapsulation means hiding the code and data into a single unit to protect the data from outside world.

3. Abstraction lets you focus on what the object does instead of how it does it. Encapsulation means hiding the internal details or mechanics of how an object does something.

4. Abstraction- Outer layout, used in terms of design. For Example:-Outer Look of a Mobile Phone, like it has a display screen and keypad buttons to dial a number. Encapsulation- Inner layout, used in terms of implementation. For Example:- Inner Implementation detail of a Mobile Phone, how keypad button and Display Screen are connect with each other using circuits.



Tags:

Difference between Encapsulation vs Abstraction

Abstraction vs Encapsulation

Differences between Encapsulation vs Abstraction

Image Credits: Freepik

Spreading Knowledge Across the World

  • United States
  • United Kingdom
  • India
  • Nigeria
  • Philippines
  • Pakistan
  • Nepal
  • Singapore
  • Indonesia
  • Bangladesh
  • Ghana
  • United Arab Emirates
  • Kenya
  • Canada
  • Malaysia
  • Australia
  • Iran
  • South Africa
  • Uganda
  • France
  • Ireland
  • Unknown Region
  • Egypt
  • Tanzania
  • Ethiopia
  • Thailand
  • Sri Lanka
  • Cameroon
  • Hong Kong
  • Spain
  • Vietnam
  • New Zealand
  • Japan
  • Brazil
  • Saudi Arabia
  • Zambia
  • Czechia
  • Italy
  • Russia
  • Myanmar (Burma)
  • Netherlands
  • Germany
  • Romania
  • Mexico
  • Rwanda
  • Sierra Leone
  • Turkey
  • Zimbabwe
  • Poland
  • Iraq
  • Cyprus
  • Algeria
  • Liberia
  • Greece
  • Jamaica
  • Malawi
  • Qatar
  • Portugal
  • South Korea
  • Argentina
  • Colombia
  • Morocco
  • Peru
  • Kuwait
  • Lithuania
  • Finland
  • Somalia
  • Israel
  • Bulgaria
  • Chile
  • Hungary
  • Trinidad & Tobago
  • Uzbekistan
  • Ukraine
  • Sweden
  • Kazakhstan
  • Norway
  • Macedonia
  • Benin
  • Switzerland
  • Oman
  • Botswana
  • Belgium
  • Ecuador
  • Slovakia
  • China
  • Croatia
  • Brunei
  • Serbia
  • Papua New Guinea
  • Bahrain
  • Guyana
  • Denmark
  • Lesotho
  • Lebanon
  • Jordan
  • Azerbaijan
  • Latvia
  • Cambodia
  • Namibia
  • Mauritius
  • Austria
  • Mongolia
  • Albania
  • Libya
  • Gambia
  • Taiwan
  • Bhutan
  • Venezuela
  • Dominican Republic
  • Tunisia
  • Luxembourg
  • Bosnia & Herzegovina
  • Guatemala
  • Solomon Islands
  • Guam
  • Costa Rica
  • Yemen
  • Bolivia
  • and many more ...