OOP interview questions :- What is the difference between Abstraction and Encapsulation ?
ฝัง
- เผยแพร่เมื่อ 8 ธ.ค. 2011
- For more such videos visit www.questpond.com
See our other Step by Step video series below :-
Learn angular tutorial for beginners tinyurl.com/ycd9j895
Learn MVC Core step by step :- tinyurl.com/y9jt3wkv
Learn Data Science in 1 hour :- tinyurl.com/y5o7qbau
Learn MSBI Step by Step in 32 hours:- goo.gl/TTpFZN
Learn Xamarin Mobile Programming Step by Step :- goo.gl/WDVFuy
Learn Design Pattern Step by Step in 8 hours:- goo.gl/eJdn0m
Learn C# Step by Step in 100 hours :- goo.gl/FNlqn3
Learn Data structures & algorithm in 8 hours :-tinyurl.com/ybx29c5s
Learn SQL Server Step by Step in 16 hours:- tinyurl.com/ja4zmwu
Learn Javascript in 2 hours :- tinyurl.com/zkljbdl
Learn SharePoint Step by Step in 8 hours:- goo.gl/XQKHeP
Learn TypeScript in 45 Minutes :- goo.gl/oRkawI
Learn webpack in 50 minutes:- goo.gl/ab7VJi
Learn Visual Studio code in 10 steps for beginners:- tinyurl.com/lwgv8r8
Learn Tableau step by step :- tinyurl.com/kh6ojyo
Many developers are confused between Abstraction and encapsulation. If you see the definitions Abstraction means show only what is necessary and encapsulation means hide complexity which looks almost one and the same. In this video we will try to unlead practically the difference between Abstraction and Encapsulation.
Get our 500 videos from www.questpond.com
We are also distributing a 200 page Ebook ".NET Interview questions and Answers ". If you want this ebook please share this video in your facebook/twitter/linkedin account and email us on questpond@questpond.com with the shared link and we will email you the PDF.
Do not miss our Interview Question video series
30 Important C# Interview Questions : th-cam.com/video/BKynEBPqiIM/w-d-xo.html
25 Important ASP.NET Interview Questions : th-cam.com/video/pXmMdmJUC0g/w-d-xo.html
25 Angular Interview Questions : th-cam.com/video/-jeoyDJDsSM/w-d-xo.html
5 MSBI Interview Questions : th-cam.com/video/5E815aXAwYQ/w-d-xo.html
You all probably dont give a damn but does anyone know of a method to log back into an Instagram account..?
I stupidly forgot my login password. I love any assistance you can offer me
@Wyatt Zain Instablaster :)
@Maurice Kaysen i really appreciate your reply. I got to the site on google and Im in the hacking process atm.
Takes quite some time so I will get back to you later when my account password hopefully is recovered.
@Maurice Kaysen it worked and I actually got access to my account again. I am so happy:D
Thanks so much you saved my ass :D
@Wyatt Zain you are welcome xD
Not gonna lie for the first 3 mins I was questioning where this was going. Great vid.
Thank you for this video!
TL;DW or for those who still might not understand:
Abstraction: The concept of allowing the user of your class to have access to only what they need. (Concept)
Encapsulation: The physical code that prevents the user from accessing fields or methods you do not want them to (Actual Implementation)
Good example would be if a user is trying to deposit to an account balance. Account balances can't be negative or over 100,000, say. So your add function has a check. A user can circumvent these checks by saying obj.balance = -123;
This is bad, so we want to use "Abstraction" to allow user access to only the things we want them to.
So we make balance private, and now the user can only add through YOUR function. The act of making the field private and adding a modifier method is "Encapsulation".
So as Manoj said, Encapsulation implements Abstraction.
thanks man perfect explanation i understand
You just gave the best explanation through a short and perfect example, thanks!
thank you so much.
I still don't understand. So if the user were to say obj.balance = -123, it wouldn't work becuase you have an add function that checks if its negative or over 100k. So in this case, we don't need to use abstraction because the user can't do anything if the given answer is not in the right criteria. Am I right?
Encapsulation: Data Hiding,
Abstraction: Implementation hiding.
Eg Getter/Setter methods are used to access encapsulated attribute data, similarly as in this video example calling a public method wherein other private methods would be executed, would be an abstraction.
No, abstraction is only putting data that are only essential to the object. Encapsulation is data hiding.
@DeepayanDas24 is correct
encapsulation is all about data hiding..... making properites private and making it accessible only through the behavious of the same object.. Thus providing necessary securty to the state of the object.. You cannot miss this point when u differentiate ans and enc.... all other points that you have told i completely agree
I am regularly watching your videos to get theoretical and practical knowledge on C#. I would say I'm a junior developer coding for years but recently from mid of 2022, I took C# seriously. Your videos are helping me to elevate my understanding much higher, and being able to understand in depth. Thank you for your hard work. I will keep watching, share with others, and share my thoughts on each video unless I'm feeling lazy to comment.
In more than 20 interview I was asked differences and I never explained. Finally I got, Great man..
to yr padh leta phle interview k baad hi
This video gives the exact clarity what I was looking for. No confusion now between abstraction and encapsulation 🙂👍👍
I seen your Video sir It is understanding Clearly.......
Thank you. This one video helped more than all the theory stuff I read on abstraction and encapsulation. Keep up the good work. Thanks again.
I really love this video. You've really done a brillant job explaining a difficult concept. Great job!
Yes practically it's very difficult to explain these two concepts, and this is the very basic. So it's important to get a better feel of these, from the beginning.
Thanks.
Thank you! I'm a student and this helped me so much understanding what abstraction and encapsulation is.
best video on abstraction,even stack-overflow could not make me understand..
thank u
And finally i came to know the difference btw Abstraction and Encapsulation.. :)
Great Explanation Sir.. (y)
I have seen a number of videos in search of the difference between abstraction and encapsulation but this video is the best and I understood the concept : )Thank you sir.
Abstraction is thought process, and Encapsulation is Real Implementation.
@Jack Wells no it didnt you guys are a bunch of liars
my salute! thank you for this simple explanation. I'd say, it's very well explained.
Thank You soooo much Sir, you have cleared one of my biggest confusion in object oriented paradigm,thank you soooooo much.
That explanation was really good. Absolutely no confusion!
Thank you very much!
Perfect and exact explanation. I had too much confusion, now all cleared. Thanks
Thanks for your clarification..i searched the whole internet and i found this video answering my question.
THE BEST Explanation, detailed and on point!
this video actually made me understand the difference.. superb...
The best explanation i ever heard... perfect and clear...!
The last four minutes of the video, was what chnaged my mind. I loved the way you tabled it. Mean explanation. Thank you very much.
Great Representation...And Today i get it in the glance of programming word, that how both works...
Now, I've got what's the abstraction n encapsulation.... Really nice video.. thnx
Best and simplest explanation of attraction and encapsulation.
Thank you very much for the video.. I use to have a lot of confusion between abstraction and encapsulation before. Now it is pretty much clear. Once again thank u :-)
Thank u so much..... I am one of the developer who will confuse these terms always.. You cleared all my questions
It really took a long time to understand the difference between them..they always appeared the same to me..but now...now i understand...thanks
Wow ! Great practical explanation !
Really excellent videos you have created. before you I does not have find such meaning full and clear concept from any other tutorials or videos. Thanks a lot. You really know what actually needs a senior and Junior developer in current days. I purchase your videos and getting preparation on that.
Really beautiful expalination my complete confusion is vanished by this video thank you very much .....:-)
Nice video to remove such a confusing topic. Thanks a million !!
i was really good... i have never seen somebuddy explaing these concepts that nicely...
You freed me of confusions! Great job
Thank you sir, Its very helpful to me and clear the confusion about both very similar topic.
Nice Explanation!!! Thank you for clearing my confusion about this difference,
what i understand:-
abstraction: what are minimum functions, and variable should expose to out side of our class.
encapsulation : how to achieve this requirement, means how to implement.
plz correct me if it is wrong....
..... as manoj said.
Yes Prakash absolutely you are on track.
Yeah but abstraction achieve by using abstract classes. So abstraction also implementation. Now you are wrong.🙁🙁🙁
one interviewer asked me to show the abstraction in coding on a paper , but i failed as i had known only the verbal answer that's it , but this video made my day.
thank you a lot.....
Very well explained. Thank you!
Best Explanation I can think off
yours videos are the best video to understand the basics of .NET.Very Good.Keep it up.
These are great videos. You are a good teacher.
very much clear..awesome session.. thank you alot.
Sir you have made this so clear. Thank you
One word... Excellent!!
wow this is fantastic!! There is also the idea that we can deal with Car regardless of its subtype, whether Ford, or Fiet... that detail can be abstracted away...
this was the best way to differentiate Encapsulation and Abstraction
what an explanation!! best ever..Shiv Sir is always the best
Sir...! This is *Great* explanation given for those two terms Thank You so much!
A very useful explanation! Thank you!
Well done! This helped me very much
wow
the explanation is
crystal clear
Thank you sir...
More powers
Beautifully explained.
excellent video....very easy to understand concept
Thanks a lot sir for this very clear explanation!
You Perfectly clarify my confusion🌼
Clear and simple, Thank You
thanks, great demonstration
Finally, I understood. Thank you!
Awesome Sir I learned very clearly what exact abstract and encapsulation
Cool really simple explanation on abstraction and encapsulation.
Simple and clear.. thanks for video
Thank you for your videos. much helpful.
Very useful videos! Thanks!
Brilliant explanation! Thank you so much. =)
very nicely explained ..an eye opener..
Very clear, thanks!
Now way better to understand. Thanks for the video.
very well explained.. thank you...
Thank you fot the great explanation!
Nice explanations and thanks a lot for your effort... :)
Thank u it solves mine problem :)
Thank you so much, Sir. It gives a clear understanding
thank you. This enlightened me.
Amazing tutorial
You have helped me clear this concept 🤗
Brilliant explanation, thanks so much 🙌
Very nice job!
its very clear, Excellent!!!
You are really great bro.. really extraordinary.. I saw lots of others videos.. but you are ultimate...
I appreciate it.. Great explaination
very good example and explanation ! thnk u!
great work
thanks for this
Superb demonstration boss.
nicely explained. Great job
Superb !!!!!!!!! cleared doubt of Abstraction and encapsulation ..Really Great Sir..
such a good video to understand!
encapsulation make sure that the property of an object and the behaviours which deals with those property are put together.
--In other words showing is necessary , putting things which are logically together.
it makes sure that an extrenal object cannot directly access the peoperty of the object.
-- So how does it ensure that external object can not access directly. ENCAPSULATION.
it essetiallly enforces security.
--I doubt
exposing only the essential behaviours
-- i did say what is necessary
Definitions are at 9:43
Not sure I wouldn't need more docs to complete.
Nice video thought. Got me closer to understand.
This is excellent. Great and clear explanation. Thank you very much.
mqutub15 great
Great video. Thank you
great description
How did you make that windows form? it looks nice
nice work...
Crystal clear thanks a lot.
This video make my day
Good Example. Thanks