Object Oriented Programming: Abstraction Vs. Encapsulation

preview_player
Показать описание
When it comes to programming "concepts" are often valued by interviewers as a way to demonstrate you understand how things work, not just how they operate. But as Sopya16 found out, sometimes they are just a way for a manager to try and feel superior.

Abstraction and Encapsulation for most people will be very much the same thing, and since a big part of each is separating the programmer for the "how" so they can focus on the "what" makes it ironic that a manager would judge you for not understanding the intricacies of these two terms.
Рекомендации по теме
Комментарии
Автор

The guy in the video is wrong.   Encapsulation does indeed have to do with hiding, especially implementation details.   Abstraction is NOT about hiding implementation details.  You confuse the words twice in the video.  Abstraction is a way of modeling a real world object with minimal information.  Example: Abstraction of an employee in the real world means you can define it in a programming language with only what is necessary.  What is not necessary?  An employee class does not need to include, for example, that the employee is composed of cells, nerves, blood, a heart, and maybe a soul.  

It's kind of funny because it's easy to see how one person watches a video like this, then goes and records their own video.  So instead of just one misinformed person, you now have two misinformed people, sharing misinformation.  And the misinformation blossoms exponentially.

charleschapman
Автор

Encapsulation: Putting an object inside another.E.g. Car class encapsulates engine class.
Abstraction: Exposing only methods you want seen.

sumertheory
Автор

language and concepts are 2 different things, encapsulation, abstraction etc can be formed across in different languages, either c, c++, etc...

HemaDarshiniSelvaraju
Автор

Sooo... placing something behind a wall for the purpose of making it invisible from a users perspective ISN'T hiding said something? l0l.

xTyrone
Автор

C++ doesn't have garbage collection.

akindofyoga
Автор

@Kouthan Yes, and you can build assembly code that is "encapsulated" for use in other languages... I didn't mean to imply that Encapsulation was only for OOPs just that was what the question was about.

BrandonWirtz
Автор

Actually I believe that you can have encapsulation in C too. You can use compiled files and just give an other file with the interface so that others know how to interact with it.

AthanasiosK
Автор

Did he say garbage collection has been abstracted in C++? C++ doesn't have automated grabage collection. If I use a pointer and don't delete it I wll get a memmory leake. C# && Java && most every other high levle language have abstracted memmory managment better.

robstokes
Автор

abstraction is hiding information from client, encapsulation is putting together a method to interact with the hidden information without bothering about the details.

usmansbk
Автор

if you cant see it mean you are hide from it that concludes why it says its being hide. as simple as it is :D

HemaDarshiniSelvaraju
Автор

@TDmillerproduction What about C#? In all Object Oriented Programming the terminology would be the same.

BrandonWirtz
Автор

@BlackwaterOpsDotCom Do you still have plans to do a video on pudcenter? Sorry if i keep asking you on youtube and twitter, you said you would have it this week. I understand you don't do youtube full time and you are very busy.

TDmillerproduction
Автор

@TDmillerproduction yeah, these are from my back log I have a bunch of vids that need to get edited.

BrandonWirtz
Автор

Great video. Your ending sounded like a shot at C++. Lol. I know that was not your intention though.

KhanSlayer
Автор

The percentage of dislikes says it all.

sourabhbagrecha
Автор

@BlackwaterOpsDotCom I can edit videos for you, but for a small fee :)

TDmillerproduction