Abstraction explained with real-life examples and code! - C++ OOP Course
HTML-код
- Опубликовано: 28 июн 2024
- 📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
Abstraction is one of the most important Object-Oriented Programming principles that confuses many beginners. The idea of abstraction is to show only the most important and essential information while hiding the unimportant and complex details.
There are many examples of abstraction in real life:
- When you drive a car, you don't need to know how the internal components of the car work in order to be able to drive it. All of that complexity is hidden behind simple procedures that make the process of driving a car easier.
The same rule applies in programming. When we make a class that has a lot of functionalities, we can hide the inner details and complex logic related to these functionalities behind a simple interface that will make it easy for other developers to use our class, without having to know how those functionalities are implemented.
In this video, I'm explaining what is abstraction, how to use it, and its purpose in real-life examples and using C++ code as well.
🎁 Create Modern Apps, 5x faster, with less code, Download FREE C++Builder Trial: bit.ly/CppBuilderFree
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. Use the link to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
Contents:
00:00 - Intro
01:05 - What is Abstraction? (with real-life example)
06:36 - Let's build a C++ program to show how Abstraction works
15:11 - The true importance of Abstraction
Pure virtual functions and Abstract classes video - • Relationship between V...
Tag me on you Instagram stories:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty - Наука
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
I have a question..
@13:14
Why we did not use /*
Android* android=new Android();
*/ instead
or maybe
/*Android android;
android.TakeASelfie();
*/
@@astaghfirullahalzimastaghf3648 Because that is the entire point of abstraction. The client code doesn't need to know anything about the child classes (implementations of the interface), not even the names of the child class. You can visualize this as the actual code of the Iphone class methods being implemented in a already compiled library that has simply been shipped to you , and all you've been told is you can get a smartphone from this library by calling a API like [Smartphone *GetSmartphone()]. Then you, as the user (client developer) of library, to take a selfie with a smartphone would simply write :
Smartphone *s1= GetSmartPhone();
s1->TakeASelfie();
If the library now changes to a Android smartphone library, the actual TakeASelfie() method code would now be different since this is now an android smartphone and a different library, but you, the client developer, don't need to change the code one bit! That's the beauty of abstraction.
As a professional, this is a really good explanation and documentation. I know that how hard it is to teach how to code especially in C++, and you doing it very well!. Keep it up!😁
You're very welcome! Thank you! 🤗🤗🤗
She really made me understand the concepts very easily, much better than my college textbooks and teachers.
you the one who made me love coding and success in my college..Thank you..please dont stop
The two unique qualities that attracted me to subscribing to this channel are 1. Real world examples (Saldina you are a unique instructor). 2. GUI programming in c++ (this channel has so far published a few - about 4 videos on c++ gui programming - I found them helpful.
My takeaways:-
1. Abstract classes are an abstraction around base classes which can be used to enforce certain functionality in all base classes.
2. Abstract classes can be instantiated using pointers only and not by creating objects of the abstract class.
3. Abstract class pointers can point to memory addresses of instances of any of its base class
4. Pure virtual functions can be used to enforce certain functionality in all base classes of an abstract class.
5. Pure virtual functions will not have an implementation in the abstract class definitions, but will use a pure specifier (= 0)
6. Virtual functions can have an implementation in the abstract class (think of it like the default functionality if none of the base classes have an implementation of that function)
Saldina ! you have literally helped me learn c++ in a matter of days! keep it up I'm sure many others are benefitting from this as much as i am!
Your teaching skills are actually better than 90% of Udemy teachers.
Accept my greetings from Palestine.. hopefully you do some tutorials about preprocessor (pragma once, define,...etc)
You're very welcome! Thank you and I'm sending many greetings! 🤗🤗🤗
There is internet in Palestine?
@@psr169 Yes there is
@@ZeroCool2211 lol i thought israel bombed the region of Palestine
@@psr169 lol
As many have stated, you really helped me understand difficult concepts that my past instructors have failed to explain correctly. Thank you so much for taking the time to do these videos, they prevented me from losing my sanity when I was hanging on by a thread. I am going through all of your OOP videos and coding along with you and I am learning so much!
Wow! Amazing instructor! I'm retired with multiple degrees in engineering and statistics but Saldina is one of the best I have seen. It is a great and rare skill to be able to break down complex topics for the learner. Excellent example and presented extremely well.
All the 7 videos on OOP are just amazing - Thanks Saldina! You are great!
This is, hands down, the best tutorial that I've seen that lucidly describes the abstraction standard C++ was invented for. Only thing that in my opinion that would improve this explanation is to briefly mention how the definition of the Android/IPhone classes can be in a completely separate library that the client code only needs to link to and get a pointer to the interface of the object from an exported API without knowing anything about the library code. This would make the process of abstraction completely clear to a newcomer who still may struggle with this example since the implementation of the class methods are inside the same page (translation unit) as the client code that invokes the methods. Seriously, amazing job, and thank you!
After failing 3 technical interviews for embedded sw because I failed to explain the definition of abstraction, I FINALLY can explain what is abstraction and the other 3 pillars. THANK YOU!
I'm glad to hear that! 🥰
Thank you for making these videos. You teach better than my professors and I was stuck on so many concepts before I came across your channel :) was becoming discouraged. Please continue making more c++ videos and ill keep watching :)
I just stumbled upon your channel and wow!! I am so amazed at how you teach the topics at hand. It clicked in way it hasn't before. I love how you simplify the concepts by using relatively easy to understand scenarios like the coffee example.
You are the best teacher on RUclips good job Saldina
Greetings from Spain.
saludos desde España
Amazing - the power of abstraction and your intuitive and clear explanation of it. Thanks!
The complex concept was beautifully explained
i spent like half of the day to understand abstraction and to find a real example of abstraction
and now here i am
fully aware of it with the help of such an awesome teacher
Great tutorials, I have watched your Pointers playlist and now am working through the OOP playlist, I am taking a college course on video game development and watch your videos to reinforce what I have learned in my classes. Thanks a lot!
come from virtual fonction and abstract function. So grateful for what you're doing. I would say this is the most outstanding explanation video for abstract functions I've ever seen. this is a good example of using coding as a weapon to help more people. That's my purpose too. So Thank you so much
It's a Very Crystal Clear explanation of Abstract concepts. Thanks so much. Completing each of your sessions is creating by default interest to see your next topics. 🙂
finally, you answered my requests about making oop videos. thanks a lot saldina i really appreciate it and am looking forward to get more
best abstraction video I got until now
Thank you for the great explanation! I've learned these before, but I actually learn it BETTER from your videos.
🤗🧡🧡
The information provided was incredibly enlightening and skillfully delivered. I gained a wealth of knowledge and found your work to be truly motivating. Your efforts in producing such valuable material are greatly appreciated!
Great Example, watched several videos but here all my doubts got clear!!
Very good and practical explanation. I had OOP courses during university but this part was always a bit "abstract" for me. I do not do advanced programming on my job - just scripting from time to time. But hey, this now makes sense! Thanks!
Thank you so much.
It’s much clearer.
I don't usually comment but i have to say that you have helped me a lot , thanks to you 🙏
I appreciate you comment very much, and I'm happy to help! 🤗☺️🧡
@@CodeBeauty in 23 of this month i have an exam in c++ i will use the knowledge thag i got from your vids and practicing
none of youtubers are capable of teaching like you ,wow what a example
After watching a lot of videos about the explanation of this abstraction thing, I finally found one that is understandable , Thank you very much
Thank you very much for such great content. Your way of teaching is really helpful and a blessing for us. You break down hard topics into simpler understandable chunks. Please make some videos on how to make GUI apps on C++ and a deeper dive into templates... ❤❤❤
Very clear and informative.
Thank you!
As a middle software ingineer I can say your tutorials are very useful and helped me to understand oop principles better. You have a new subscriber and good luck in everything you do !
🤗❤️
i just saw your video OOP using cpp in free code camp channel.. let me tell you , you are amazing. this tutorial was up to the point and very easy to understand. SUBSCRIBED you for more.
Thanks for the video it was really useful. In general, abstraction is about two things: 1- Hide the detail of implementation. 2- Generalize by identifing common essense. here in your example you folllowed these two goals.
Precise and informative, best explanation of Abstraction in C++.
A wonderful and interesting lesson, especially the realistic examples, and I liked it very much ❤️❤️Thank you for your efforts
Extremly Helpful Tutorial . Thank you ❣❣❣❣
Very well explained! Thanks!
Thanks for you Time, and happy ramadan for all Muslims
Happy holidays pretty and a wonderful new year. Excellent video.
Extremely helpful tutorial. Thank You!
you're welcome ☺️😄
Superb!! Your lectures helped me to understand OOP. Break a leg for you
Understood the concept of Abstraction through real world example. Thanks.
Thank you.. You are such a blessing
Very well understood thx for the help ❤❤❤❤❤❤
Thank you for this clear explanation of Abstraction!
The way you teach is really interesting and easy to understand, thank you so much for your lessons.
By the way, could you please make videos to teach about design patterns in C++
That's amazing! ❤️
Thanks .. very detailed and clear explanation. .. really appreciate.
Best teacher ever!!! Thanks a lot for your time and for sharing your knowledge, could you recommend some resources for learning winapi implementation in c++.
I got here so far, and I have learned so much in this playlist than I did in college. I thank you so much and you have saved my life. I wanted to ask if you can make a video (How to start a school project) Like I am getting a project from Data structure and they are making us fill in lines in the code between ////todo//// so I am having trouble trying to find out how to know which code to put or how to trace the code or how to troubleshoot or debug. This project is called (Shopping Cart Project) or (Booklist project) If you want me to send you one of a sample, I can send you the project.
What an amazing video, everything is now crystal clear. Thank You🙏👏👏
😇💙
Hi Saldina. Please create a playlist for a full project
Really Helpful and very very thank you.............
Nice explanation!
Just thank you a million times!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Very interesting, thank you very much!
Thank you, you just helped me in college frfr
Thank You!
Thank you for this helpful video
abstraction and abstract class are two different things. abstraction is implemented in all classes but not all classes are abstract. Nice presentation.
would you make more videoes regarding other features in oops like overloading ,
Yep, operator overloading video is here: ruclips.net/video/BnMnozsSPmw/видео.html
:D :D
Good teaching skills, you make me understand better.... Thanks
Who else noticed the dark mode ☠️☠️
I like your class very much!
🥰💙
great explanation
I wish you great success, health, love, and happiness
♥️♥️♥️♥️🌹🌹🌹🌹
Thank you so much! I wish a the same to you!! ♥️♥️♥️
Nicely done!
🙏💙
So an abstract class can help ensure that things are following a kind of convention so that actions can be performed in a similar manner across different objects of that type. I suppose this is even more important when working on a project with multiple coders as well as keeping things clean and readable.
Madam , you are teaching very well. I am your regular student. Madam, I think now its time come to make some comprehensive gaming code by using c++. I sincerely request to you to make some coding on games or any app development.
Hey thanks a lot, this Android example was too good!
really nice content by you saldeena mam thanks alot
A very good video. Less detailed regarding how different developers can work together, copying all abstract functions for example shown I. E android and iphone in one file is error prone. Maybe headers and libraries for android and iPhone can further enhance this concept.
Thanks and wish yu loads of happiness
🙏💙
It was the best explanation of abstraction I have ever heard! I have two questions:
1- Why did you choose dark mode in your IDE this time?
2- Why didn't you delete the s1 pointer?
I guess the dark theme was often requested, otherwise people apparently didn’t trust that this is the real deal. The missed delete however is not a good practice. This should be like the second nature: wrote new, write delete.
excellent job thank you
Thanks for watching! 🤗
Bahut badhiya ..
Great video
Thanks for your videos. Your English is really good and understandable because you articulate well. However I usually put the translation in French so that it is easier for me and on some videos the option is not activated.
Please make a video about abstraction vs encapsulation,
I like how the dark mode syngergizes with your outfit
very helpful
today at first i see your video, just amazing your teaching. move on as a good tutor.
Excellent
Amazing!
Thank you! Cheers!
I suggest you to read OOAD (Object Orineted Analise an Design) by Grady Booch. Abstraction is not for hidding complex components.
what should I do after I finish this playlist? Is it the complete oop course?
Thank you for everything btw ;)
What is the major you work in in the field of programming and what are the programming languages that you know
And what is your age
and I need a plan to learn artifical intelligence with c++
Hi Saldina,
Could You make the videos in a way, when you explain something for a longer period, like abstraction here, that we do not see visual studio, but we get You full screen. Even though I am watching on laptop, I find my nose almost touching the screen. VS at this point has not been used and is not important, your explanation so far is everything.
Love your videos and content
Keep up the excelent work.
Would be awesome and helpful if u used oops concept in real projects...like software mini projects
Saldina is back🥰🥰🥰I love your way, sister!!
Every Wednesday around this time! 🥰🥰💗💗
@@CodeBeauty your free code camp video of C++ OOP introduce you to me, from that video, I am big fan of yours, I am also teacher of maths, (teaching simultaneously student) , I learned a lot from your style of teaching, ❤️and I don't wanna miss any video from you... , I assume you as my elder sister , and learn from you ..... ❤️Thankew.. 😉😉😉
@@himanshurajpal7842 Thank you so much. This is a very nice comment and you seem like a very genuine person! 🙏💙
@@CodeBeauty thankew didi( in India, we call elder sister as "didi" a sign of respect) I also connected you on LinkedIn. I hope my career will be bright under your guidance and I will achieve my aim to get selected in Product based companies under your supervision.❤️😉
I want to do more exercise about OOP in c++. Can you give some exercises about this, please? I thank you very much
set your ide theme with your cloths?
genius and beautiful :)
She is explaining the code, while I'm falling in love.
Datastructure and algorithm video
Thanks for this. I have a question not related to this but on OOP. When is the keyword "this" used. I see that a lot but can't seem to figure out the importance. Is it equivalent to the "self" keyword used in python? Thanks in advance
more and more tutorial do makes on c++. advance topic like: method overloading, interface, constructor, object, inheritance, encapsulation, data bind, polymorphism etc... please cover this topics.
Topic Recommendation :
Interview questions and answers in OOP