encapsulation vs abstraction

pratap singh, upendra

pratap singh, upendra

@pratap-singh-6xlmve Oct 27, 2024
Hi friends,
In context to object oriented programming: -
  • What is the difference between data abstraction and data encapsulation?Are they both implementing information hiding?
  • 'A class encapsulates the methods and data members defined in it'. So, is encapsulation not representing a simpler view of a class(in terms of its functions and data members)?How does the concept of security comes up then?
  • Actually it should be data abstraction representing secure data access since it is hiding low level details of implementation. Am I right?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • rahul69

    rahul69

    @rahul69-97fAOs Jun 3, 2015

    Encapsulation implements abstraction. ie you encapsulate things to abstract the underlying parts.
    😀
  • pratap singh, upendra

    pratap singh, upendra

    @pratap-singh-6xlmve Jun 3, 2015

    Is it fair enough to say that encapsulation apart from implementing abstraction also puts methods and data members within the class?