0
Differences between Encapsulation and Abstraction
Hello guys! Im just a novice, and struggling to truly understand these 2 encapsulation and abstraction. Both of them is about hiding internal details of an object. Ive been searching for this on the Internet and someone said: Encapsulation: hiding the details of an object from the outside world Abstraction: represent the important features without representing the background details (complex real world -> simplest manner) If both is to hide details so why do we need encapsulation, plz explain and example
6 Answers
+ 1
Yeah! I got it, so encapsulation is like deeper than abstraction right? LoL sorry for my silly comparison. When it comes to coding, the real work of the computer behind the screen is encapsulated from me, so i dont know how it works but i can still use the function... and when i finish coding a program, all the things are abstracted from the users so they can just use it without understand anything else right ^^! Thank u so much
0
Actually ur explanation was rather hard to understand, but i get it a lil bit, tks. Btw i think the second part of your second answer should be abstraction ?, idk but just as ur first answer, idk how they grow plants, feed animals... but all the stuff are still the so it should be abstraction?
0
I appreciate it man
0
I think i didnt totally get this but anw tks a lot man