encapsulation vs abstraction

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

  • rahul69
    rahul69
    Encapsulation implements abstraction. ie you encapsulate things to abstract the underlying parts.
    😀
  • pratap singh, upendra
    pratap singh, upendra
    Is it fair enough to say that encapsulation apart from implementing abstraction also puts methods and data members within the class?

You are reading an archived discussion.

Related Posts

Newest entrant in the Android market is Passion 660 from PHICOMM, the brand from Shanghai Feixun Communication Co., Ltd. a Chinese enterprise that has launched several smartphones in India. The...
Every Mozilla Firefox user who has updated his/her installation from 38.0.4 to 38.0.5 today would have noticed some welcome additions to the third most popular internet browser in the world....
Noise cancelling or noise suppressing earphones help us minimise outside noise and enjoy music in silence. But what if you wanted a pair of earphones that enhance the sounds that...
It is undeniable that artificial intelligence (AI) has become an important part of the billion dollar company-Google. As a matter of fact robotics, delivery drones, driverless cars and big data...
Brainprints are brain's unique brainwaves that correspond to audio-visual inputs. It looks like brainprints aka brainwaves are the answer to the problem of passwords - which have become easier to...