Relationship between Virtual Functions, Pure Virtual Functions and Abstract Classes in OOP explained
HTML-код
- Опубликовано: 30 июн 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.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE-CB
It is a powerful, secure text editor designed specifically for programmers.
In this Object-Oriented Programming course, I'm explaining the relationship and purpose of virtual functions, pure virtual functions, and abstract classes.
C++ Virtual functions are functions defined in the base class and redefined in the derived class, whose main purpose is achieving runtime-polymorphism. Virtual functions are defined with the "virtual" keyword in the base class. You can find a detailed explanation and an example in this video, and I'll also show you how the runtime polymorphism achieved by using virtual functions looks like.
Pure virtual functions in C++ (abstract function) in C++ is a virtual function for which we don't write implementation in the base class, but we only declare it. In order to declare a pure virtual function, you need to assign 0 in the declaration
Abstract class in C++ is a class that has at least one pure virtual function. The classes which inherit the abstract class must provide a definition for the pure virtual functions, otherwise, they would be abstract themselves and you wouldn't be able to instantiate them.
The main purpose of an abstract class is to provide an appropriate base class from which other classes can inherit.
🎁 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 - Into
01:21 - Virtual Functions
12:21 - Pure Virtual Functions and Abstract Classes
17:28 - Polymorphism example
🎹 Fun fact, on my language accordion is called "Harmonika" like the word harmony.
Accordion compositions I like: bit.ly/compositionsILike
My favorite composition (The Danube Waves): bit.ly/TheDanubeWaves
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 would love to but your page only accepts PayPal. Please consider updating to other payment options.
@CodeBeauty, wow you code everyday like this?! Ur kinda cute!! 😋
Plz Provide link for CODE in Description
You have explained to me what the book didn't explain. You have helped me create and compile my midterm project. Thank you very much! I wish you the best of success in all your endeavors.😀👍
YOu have an amazing voice, i want to marry you
None of my University teachers were able to made programming look so easy like you do. Good job on being such a great teacher!
☺️🤗🧡
The fact that you decided to keep the nostalgia you got apart of this video shows how much effort you put into these thank you so much for these videos
🥰🥰
Finally someone who explains things as simple as they are and does not complicate them. Thanks
Thank you so much for this video, I just got my first tech job as a C++ developer, and the only C++ questions during the interview were about virtual functions, so you helped me get the job!
I'm always amazed how this OOP videos can summarize 1 week of formal programming courses.
They are rudimentary, but an ideal start.
Leterally u can beat any professor in teaching skills.
☺️🤗🧡
Absolutely
Exaxtly
Oh girl you are blowing my professors and teachers out of the WATER 😭😭😭😭 bless your soul queen 🙌🙌😭😭 I hope you make it to heaven
Thanks so much ☺️🥰🥰
Thank you for teaching the world C++ in logical, bite-size chunks! I am a longtime C programmer and am just getting up to speed on C++. Your course is helping me do that with minimum effort. I was prompted to leave a comment because I too played the accordion when I was young and I too miss playing it!
YOU ARE AN AMAZING TEACHER. I dont need to check for someone else's tutorial. I am always sure that your tutorial is all I need to understand OOP.
Thank you Sensei! You taught me passion, patience, precision, peace and Abstract Classes. 🙏 🙇
The most unique video I've ever seen. It is incredibly well explained and completely comprehensive. Well done!
And here I was studying and now I just got sidetracked by the accordions... I don't regret it. Thanks for your invaluable help in the videos! You truly have a deep knowledge and talent in teaching programming! Keep up the great work!
I just loved how clear and confident you are while teaching, pleased that I've found your channel♥️😊
This is so interesting. Thank you for the time you invest on your videos. I come from Java, and I find myself fighting my brain on syntax a lot. Thanks to you that process has become way easier.
I was so daunted by what this topic had in stored but you made it really simple to comprend. I appreciate you and your value to the coding community. Thank you !!!
Love Ur work. Explanations are never complex , but build from the basic up to total completeness.
It is so nice to see the real BEAUTY OF CODE! Thank you so much for sharing these beneficial informations with us, you literally 100 times better than my profs.
🥰🥰
This teacher has a great art of simplifying things such that even a new student is able to take out the core meaning from her session. Good Job teacher
Thanks a lot for this! I watched this video about an hour before my exam and it helped me do what I was supposed to do. Everything's clear and concise. You're a brilliant teacher!
the notation used in 06:44 Instrument* i1 = new Accordion( ); it is also used in linked list as Node* newNode = new Node( );
but I do not understand why this is done in this way, any help? thanks!
thanks teacher Saldina!
Saldina, thanks for your videos. I've been trying to learn c++ for so long, but always get deterred and bored. You present c++ in a consumable format. So I'm finally learning it. :)
Grateful for your work! 👏🏻👏🏻👏🏻
Much appreciated! 🙏💙
your way of teaching also like pure virtual function forces me to understand the topic easily.😁thank you so much.
I must say, I'm so glad I found this video. I was having a really hard time understanding the concept of virtual functions for months. This demotivated me and caused me to take a long break from learning C++. However, after watching YOUR explanation of it, I actually understand the concept now and the purpose of using it. I've had more confidence in learning the language since then. Thanks!
Welcome back after a long break. You are amazing teacher.
Your way of teaching is very educational!!! Thank you for this chapter.
I watched many c++ tutorials and this was the first video I watched that I allowed me to understood this concept! Thanks!
That is great to hear 🤗😃😃
Thank you so much for such good quality video's! i am currently studying for an exam to the army and your vids present the needed knowledge very well!
Watched so many tutorials about virtual functions. None of them was this good. Awesome example for virtual functions
Thanks! Your channel is so helpful!!
wow this video clear out all of my confusion related to the virtual function.
thanks a lot for that.
Excellent lesson. Your teaching is concise and refreshing.
This helped me alot to understand these. Thank you.
The way you teach c++ makes it more simple... Nice work ma'am.
Thank you for sharing the accordion story!
Phenomenal teaching, thank you for explaining it so clear!
As an electonics engineering student, I love u r tutorials. Thanks for your nice explanation. greetings from Turkey :)
The pacing in this video is great! Will you consider doing more in-depth videos about C/C++ internals?
Yes, absolutely! Thank you! Glad you enjoyed it! 🤗
Thanks for making such a clear explanation to the virtual and pure virtual function
I really like your teaching style. Your explanation was awesome .
🥰
You made it so simple. Thank you 😊
Your channel is a goldmine of knowledge thank you so much
Very good examples to explain the concept.
Is it just me or the word harmonika itself is already music to my ears. Just so cute🥺.Thanks for sharing!
Ya, I used to play Bassoon in school for a while, and I get nostalgic for that from time to time like when I hear some music with a prominent bassoon part.... Thank you for sharing about playing the accordion!
☺️🤗🧡
love your videos . they are pretty specific . thank you
Clear, informative and gorgeous videos. Many thanks for amazing C++ tutorials dear Saldina, greetings from Turkey 👍
The accordion choices are great! The hungarian čardaš remembered me about a passage of Brahms' Hungarian dance n°4
Thanks for sharing the accordion link with the Just Duet channel. It was very amusing to hear the "Super Mario Bros" and "Still Dre" songs. I chuckled a bit seeing how straight their faces looked as they played.
I hope you'll continue with your passion in playing the accordion, it sounds like a wonderful instrument meant for a wonderful person.
We want that video of Beauty (Literally) playing Accordion right now.
Great explanation btw
Thank u so much for this great explanation!
First time I see you getting so emotional.
Sometimes I get emotional like that. And tears just come up from my eyes without noticing.
Thank you for the video. You explained it so well. I am learning this on my c++ course at university and this is really helpful!
I am just fallen in love the way you teach and your explanation
Thank you for another great video. Just for the clarification, please explain the difference between using, Instrument* i1= new Accordion(); and Instrument* i1= new Instrument(); in this situation.
Hi, do you know why did she use "new"?
The accordion nostalgia bit was a nice touch.
Looking forward to creating a concert in C++. Instrument class example 👍
incredible playlist
You are a great teacher. Thank you.
thx very much this video really helped me alot .. your videos are really easy to understand and very helpful
Nunca había aprendido tantas cosas en tan poco tiempo eres una excelente maestra 😉. Saludos desde Lerdo, Durango. Mx.
I Played Piano in music school for 10 years (6 years as a main intrument, 4 years as a secondary instrument) and oboe (4 years in secondary school).
I finished artistic profile in hight school (graphics) and then I spent 14 years at the University as a student and PhD at physics and engineering. And finnaly since 2014 I'm an embedded programmer.
My friend played accordion in music school and we met again at the same university - After PhD he became automatization engineer.
the nostalgic accordian part Was really adorable , keep it up mam , u teach very Well , may god reWard u
Amazing explanation. It's a tough subject for understanding but....you saved my night.
its very helpful ... explained in one of the best way.....
You made this easy to understand .Thank you :)
I'm new to classes and objects and your videos are very like very helpful
Today example taken to describe is awesome.
Thank you saldina your videos are helping me a lot in my university works.☺
what, i was scared of oop because of what they all talk about. i think you make it very easy and understandable. thank you so much! also i really like the shirts you wear
Thanks Saldina...It was a great video ❤❤
I am an Opera Singer and also a voice teacher and a choir director. When i was young I was studying programming and chemistry which i never finished. Due to Covid I returned to study programming again, but it has been hard on me. Because I am not so young, although your videos and explanations have helped with my understanding of how the process should be done. I wish all teachers were helpful as you are.
thank you again.. so clear and well explained..
.. btw, I'd LOve to see you playing the accordion!
Such a clear explanation, and u have a very nice smile. god bless U....
such a clear and smart explanation. thanks so much
Thanks!!! Excellent explanation
Crystal clear topic thanx madam...
2 years down the line but video it's very lively like you're doing it today. We will forever miss this lectures
In Kenya the instrument is used in folksongs
Thank you so much. Good explanation
Thank you so much for your video!
Like the Fleetwood Mac song goes .... You make learning Fun!
Many Thanks.
Thanks. For making things clear
Svaka čast, prepametna i prelepa Mostarko
🙏 ❤️
Awesome video ! much appreciated
hey, I'm coming from code camp, your lessons it's amazing , I'm Montaha from Libya (north Africa)
Finally 😍I was waiting for oop tutorials
Thanks a lot for your teachings!
I'm learning C and C++ in school and i always learn something there and you upload a video about it!! Is amazing, With this videos i understand everything perfectly and learn new things you add :D
🤗🤞🧡
You are currently the best c++ teacher on RUclips University
You are an excellent teacher! I myself is a retured university ass. prof and have given many lectures in advanced Java programming among others. I took me several years to be as good as you !!!
Thank you so much! 🥰
Most convinent one....thanks for making this video.
Great Video. This was very helpful
Appreciated the work and teaching skills from India....
thank you for all your efforts.
Excellent interpretation of Argentina. A. Piazzolla - Libertango in your link ... Thank you !!!
Your explanation is really superb.
❤Cpp getting wayyy better!!!!!
Wow such a perfect explanation, thankyou so much, make more practice questions on c++.
you are my favorite teacher in C++ i like ur explanation keep going :)
You explained very well. Despite the explanation was in English I understood everything and you cleared up any doubts I had. Thank you.
Very clear explanation, thank you a lot :)