forum

Home / DeveloperSection / Forums / How many types of encapsulation in OOP concept?

How many types of encapsulation in OOP concept?

Royce Roy374212-Jun-2013

What are the different types of encapsulation?

Am I right in thinking this basically refers to central OOP concepts such as Abstraction, Polymorphism and Inheritance?

My understanding of encapsulation is that it is a method of hiding data / functionality, but I never really considered Polymorphism or Inheritance a form of encapsulation, although I can see how polymorphism could be considered encapsulation as it can hide the exact type of the object you are interacting with.

So, would you say that's about it, or am I missing some core concepts?

edit I just noticed in the comments someone mentioned it could refer to private / public methods, perhaps I'm thinking in to the question too much and expecting a more complicated answer than it really is?


Updated on 12-Jun-2013

Can you answer this question?


Answer

1 Answers

Liked By