+ 1
what is encapsulation?
6 Answers
+ 6
encapsulation:wraping of data & its functions into single unit
+ 3
It is the idea that the implementation details of a class and its function should be kept to function names and requested arguments only.
You should never give direct access to a classes internal state or fields, only public access points (getter and setter functions).
In short, I should only know the required input and exspectd output, not how that output is achieved.
+ 2
Enclosing something inside of something, not revealing the internals to the outside. Making a "black box".
+ 2
wrapping of data into one single unit
0
ThNks
0
Thanks everyone