please explain encapsulation in simple terms | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

please explain encapsulation in simple terms


19th Feb 2018, 11:30 AM
Jay Jay
Jay Jay - avatar
3 Answers
19th Feb 2018, 1:21 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 2
I would refer C++ class' concept to answer this. Bringing together data members (data) and their associated methods (functions) in a single unit (class) is encapsulation. It is one among those OOP concepts and C++ implement this beautifully.
19th Feb 2018, 12:03 PM
GeekyShacklebolt - avatar
+ 2
encapsulation means enclosing the things inside for them to be protected and also for them not to change.
30th Apr 2018, 2:19 AM
James John Chirwa
James John Chirwa - avatar