unable to know whether following is encapsulation or abstraction

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jitendra kumar rathi
    New Member
    • Dec 2009
    • 1

    unable to know whether following is encapsulation or abstraction

    " it facilitates the object to hide its implementation and expose only interfaces"

    this above line is for encapsulation or abstraction???
    and how??????


    my next question is that-

    does encapsulation hides abstraction??
  • mrjohn
    New Member
    • May 2009
    • 31

    #2
    That's a little hard for me to tell without the context, but it sounds like encapsulation to me, as abstract methods have no data to hide.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      This would have been simply answered by doing a little research on the topics of Abstraction and Encapsulation.

      It's very hard to answer your question because you've left out the context of the quote.

      Abstraction "hide the implementation" of a control or Object.
      Encapsulation also "hides implementation" .

      There is a big difference between the two: encapsulation exposes methods and members to other code while hiding other methods and members. This is done with the public and private scope modifiers. There is a lot to encapsulation so you should look it up.

      Abstraction involves the facility to define objects that represent abstract "actors" that can perform work. It reduces hides the implementation of the objects.

      Please do your research before asking a question.
      And also, please provide a context for your future questions...

      -Frinny

      Comment

      Working...