C++ OOP - What is inheritance in programming?

  Рет қаралды 145,571

CodeBeauty

CodeBeauty

Күн бұрын

Inheritance is one of the most important characteristics of Object-Oriented Programming.
Inheritance is a process in which one class (aka derived class/child class) acquires all the properties and behaviors (variables and functions) of its parent class (aka base class/superclass) automatically.
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCpp...
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObj...
🚀📈💻🔥 My Practical Programming Course: www.codebeauty...
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.
☕ 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. You can use the link below to make a contribution: bit.ly/CodeBea...
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! ❤️😇
C++ Object-Oriented Programming related videos:
• C++ OOP - Introduction... - Introduction to OOP
• C++ OOP (2020) - What ... - Constructors and class methods
• C++ OOP - What is enca... - Encapsulation
C++ for beginners course: • C++ FOR BEGINNERS (202...
C++ functions course:
• C++ FUNCTIONS (2020) -...
Follow me on other platforms:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty
******Initial code is available on TrueCodeBeauty Git******
github.com/Tru...

Пікірлер: 150
@CodeBeauty
@CodeBeauty 3 жыл бұрын
📚 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.
@john_smith281
@john_smith281 4 жыл бұрын
"we still have an error but we have a different error which means we are making progress" so true :)
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Hahahah, I haven't noticed this myself. It is so true! 😂 #developerlife
@lhaellor
@lhaellor 2 жыл бұрын
I OWE YOU I COULD NOT UNDERSTAND ANYTHING FROM WHAT MY TUTOR WAS SAYING NOR THE TEXT THEY ARE PROVIDING FOR LECTURING! THANK YOU AGAIN YOU ARE MY LIFESAVER. WATCHED EVEN ALL PREVIOUS VIDEOS TO FOLLOW UP WITH THE EXAMPLE AND MADE MY OWN EXAMPLES.
@mostlyoldschool
@mostlyoldschool 3 жыл бұрын
For those of us who could not have otherwise had the opportunity to access such wealth of knowledge and skills; Your life-changing generosity is beyond measure.
@jarepondio
@jarepondio 3 жыл бұрын
Cant believe im paying thousands of dollars in college tuition and get terrible quality teaching and she gives it out for free
@najlitarvan921
@najlitarvan921 8 ай бұрын
Sadly we do not pay for tutoring, we pay to get a paper that dictates our lives
@ibrahimsabah1842
@ibrahimsabah1842 6 ай бұрын
@@najlitarvan921 damn that's soo true
@zbigniewsak7045
@zbigniewsak7045 3 жыл бұрын
Your computer courses I have seen are fully professional and complete. I would recommend them to anyone who is interested in computer science.
@dr.rajenderkumar5290
@dr.rajenderkumar5290 Жыл бұрын
I am new to the Oops concept. Your approach is practical and easy to understand. Direct work, to the point, no unnecessary talk. Thank you
@photo_gaaton
@photo_gaaton 4 жыл бұрын
You are the best teacher for c++ .Thank you for this lessons.
@dinshinfeld6
@dinshinfeld6 7 ай бұрын
one of the best programming videos I've ever watched! Thank you
@CodeBeauty
@CodeBeauty 7 ай бұрын
I'm happy to hear that, thank you! 🥰
@canhobby6286
@canhobby6286 9 ай бұрын
Thank You- just what I needed.... I can't always use your wisdom because I am using a cross-compiler for RISC-V microcontrollers - BUT this gem is helpful - too bad it is one of you earlier videos before you switched to using black background - so hearing your voice was the most important.
@semirdzhyan
@semirdzhyan Жыл бұрын
Thanks for your great videos! I appreciate you staying focused on the topic and keeping your lessons succinct. I often watch your videos at 2x speed due to low attention span and keeping your videos as clear as they are really lends itself well for 2x viewing.
@speed4207
@speed4207 4 жыл бұрын
THANK YOU! Just reading this text book is a chore. You do a fine job turning these abstract terms and definitions into usable information. THANK YOU for serious.
@yashsonawane905
@yashsonawane905 3 жыл бұрын
My confusion regarding access modifiers has finally got cleared 😊
@mohammadImanmansouri
@mohammadImanmansouri Жыл бұрын
this teacher is best & this channel is best .🤩🤩
@Luther835
@Luther835 2 жыл бұрын
Thanks so much for this video. I was trying to understand how to use base class variables in some arduino code. You made it seem so straightforward!
@neemaidris9681
@neemaidris9681 3 жыл бұрын
Thank you Saldina. I really appreciate the way you explain things
@shubho5das
@shubho5das Жыл бұрын
Your OOP Tutorials are the BEST, love them!
@chalkypj
@chalkypj 3 жыл бұрын
Thank you so much for all your videos. I really have learned a lot from them and your explanation of inheritance here was amongst the best I have ever seen. You make things so much easier to understand.
@ksanavengsar4050
@ksanavengsar4050 Жыл бұрын
Saldina! Thank you so much !!! You are the best teacher! Love your channel!
@ingrid2748
@ingrid2748 4 жыл бұрын
This is great, just started my second semester in uni and we are going to see object oriented with C++
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Where are you from if I can ask? I've done a lot of C++ in my uni as well. 😊
@ingrid2748
@ingrid2748 4 жыл бұрын
@@CodeBeauty I am from Colombia , but i speak and understand english very well, So your videos are the best !
@leetcoder1159
@leetcoder1159 2 жыл бұрын
@@ingrid2748 can we do peer programming?
@ChrisDarnell
@ChrisDarnell 3 жыл бұрын
This was great Saldina, thank you for this C++ series!
@ivanm3214
@ivanm3214 4 жыл бұрын
Hi there. Tell me if I'm wrong, but, according to your inheritance definition in the description, the parent class acquires all the properties and behaviors of the derived class (?). Shouldn't it be like "Inheritance is a process in which one class (derived class) acquires all the properties and behaviors of its parent class (base class) automatically."?
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Yes, you are right, I checked out the description of the video, it was messed up. I've changed that now. Ivan, thanks for informing me about that! 😊
@Hiyori___
@Hiyori___ 3 жыл бұрын
I’m so grateful! These videos saved me a lot of time.
@rahultom4310
@rahultom4310 7 ай бұрын
Thank you for wonderful explanation. But I have some doubts. 1). Can we include attributes to derived class? 1.1). If yes how can I use them in the constructor of derived class? 2). Can we use this first derived class as base class for an another derived class? 2.1) If yes, should we have to specify both base class(in this case cookingYTchannel and YTchannel)?
@diegoi1313
@diegoi1313 Жыл бұрын
Thank you for the well explained video
@leonardopantoja7121
@leonardopantoja7121 5 ай бұрын
Estoy aprendiendo contigo de verdad y fácilmente este tema que para mi a sido tan complejo. Muchas GRACIAS.
@aichalammamra506
@aichalammamra506 9 ай бұрын
Hello , thank you for this imazing channel i have two question for you please : 1.In what order are constructors and destructors of member objects called of a class? 2. In what order are constructors and destructors of base classes called? of a derived class using multiple inheritance?
@elinak3955
@elinak3955 4 жыл бұрын
Yes! Thanks a lot. Finally! You not only Beautiful , you are Talented too! Best explanation ever!
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Thanks Elina 🤗
@AK47_Maurya
@AK47_Maurya 5 ай бұрын
Dear Saldina, the video is very basic and useful. I liked your way of explanation also. Thank you very much for this playlist on "C++ OOP". I have a question, is it necessary to have same (in number and type) arguments in the derived class constructor as the base class constructor?
@sakha_uola_
@sakha_uola_ Жыл бұрын
I am complete newbie your tutorial makes things look so easy. You are really talented:)
@mokogwuchiedu1068
@mokogwuchiedu1068 3 жыл бұрын
15:20. Hi Saldina, great work and very clear explanations. Would it be better to define a getOwnerName() method and use in the cout than to make OwnerName protected in the video. Also, what is the difference if a getter/setter method is used versus using the protected keyword. Thanks
@drulli1
@drulli1 8 ай бұрын
Hi, can we derive a class from a derived class? For example Ytchannel -> CookingYtChannel->SoupChannel ? Will the same methodology regarding to constuctures, etc. apply for the "grandchild" class? Thanks for your videos with all the proper examples, very helpful!
@aysegulakpnarl2791
@aysegulakpnarl2791 Жыл бұрын
perfect for beginners, thank you
@fatimarashid2639
@fatimarashid2639 6 ай бұрын
Another great video lemme just watch it again and again till it instills in my brain
@elderwand663
@elderwand663 3 жыл бұрын
I have a question . What is the need of a protected access modifier when we can use the public access modifier for the same purpose? what differentiates public from protected
@JarekAtWork
@JarekAtWork Жыл бұрын
You explain as if you really really want us to understand. And we are starting to understand.
@AshishKumar-me8pr
@AshishKumar-me8pr 4 жыл бұрын
Thank you so much for the Video, Can u also start adding some advance topic in c++ and then modern c++11/14/17
@ajayjoshi5932
@ajayjoshi5932 3 жыл бұрын
Just excellent teaching, please add some more video on HTML ans CSS Programming,Thank you
@deveshbhati8852
@deveshbhati8852 2 жыл бұрын
Can you please make a programming video in which we can use all the opps concepts with example like inheritance, polymorphism, virtual and abstract etc.
@m.g.mourad3241
@m.g.mourad3241 2 жыл бұрын
I have a question. I have noticed that private section has declared variables only while the public section has functions only. Is that always the case or this is just specific to your example?
@tejasbalkhande2611
@tejasbalkhande2611 Жыл бұрын
watching 30mins before exam.....it was best decision
@michaelonyiac
@michaelonyiac Жыл бұрын
Hi Saldina, Do you know how I can see my outputs of my code? it shows that the compilation was successful but it does not output the code
@5g8ohsl
@5g8ohsl 2 жыл бұрын
great content thanks, can you please make a video about composition
@6ixgames731
@6ixgames731 5 ай бұрын
Hi Saldina, i have an issue with my code the practice recipe code under the cooking constructor after running my code its displaying at my first line int the result instead of displaying at the last line and in my line of code its after my subscriber count .
@SwechhaShrestha-r6u
@SwechhaShrestha-r6u Жыл бұрын
Hi I have a question if we can have two object name do the same thing then why do we need the inheritance. For example we can do youtubechannel x1(); and youtubechannel x2() and put two different names inside.
@Muhammad_Bilal_007
@Muhammad_Bilal_007 11 ай бұрын
i thank to you for all of this effort for students
@adarshbharti8782
@adarshbharti8782 2 жыл бұрын
Totally crystal clear topic, thanks a lot mam...
@Tony770jr
@Tony770jr 3 жыл бұрын
Good video, but could you make the editor font larger as there is a lot of whitespace, and I frequently you my phone for watching. Thanks...!
@holyshit922
@holyshit922 4 жыл бұрын
CodeBeauty, Beauty who writes the code and teaches how to write a code I found C# compiler in Windows OS and tried to write code in it but i can't find good tutorials for it I had Java in school and there are similarities between Java and C# but there are also differences I learned in school following languages (chronological order) Pascal - procedural programming C and C++ Java Last time I watched C++ course in my language the video was about SFML I would like to remind myself subjects which I had when I used to go to school
@DimebagGaurav
@DimebagGaurav Жыл бұрын
Can you show us some examples on how to use OOP for writing device drivers or board support packages or hardware abstraction layers. It would be so amazing for many people.
@nagendrapp2213
@nagendrapp2213 4 жыл бұрын
could you please start in-depth Data structures and algorithm series
@invisibleliberty2275
@invisibleliberty2275 3 жыл бұрын
Could you show us the public methods? As in what in the curly brackets. Thank you.
@cyp_
@cyp_ 4 жыл бұрын
Could you explain concepts in c++20 ? Please...
@CodeBeauty
@CodeBeauty 4 жыл бұрын
I'd have to build up some videos prior to that one so that other people on the channel are able to understand it. That is why I'm gradually increasing complexity of this course and introducing new things. I'm writing this idea, but if I make it in the future, it will not be "hey, here is a random, offtopic video about concepts in c++ 20" but I'd plan other things that go in the same category with that video, and make a full course of it. 😊
@Thebiggame-dc8ek
@Thebiggame-dc8ek Жыл бұрын
I didn't understand well. If the child class inherits the private variables of the parent class, why we should use it in protected part? What does the Child class inherit from the Parent?
@usmanghafoor5395
@usmanghafoor5395 3 жыл бұрын
hey saldina can you tell me, how working for loop in this video, which logic using here any why use : in for loop i don't understand
@vasuoberoi1810
@vasuoberoi1810 Жыл бұрын
hi can u please cover all the concepts to Inheritance, Like types of Inheritance: Multi-level and Multiple
@Jonathan-ru9zl
@Jonathan-ru9zl Жыл бұрын
Thanks!! What is the role of the constructor?
@CodeBeauty
@CodeBeauty Жыл бұрын
There is another video about constructors on my channel. Hope it helps 🙌🥰
@queeNkatie2010
@queeNkatie2010 3 жыл бұрын
I can't thank you enough! 🙌🏻🙌🏻
@tombarrett2306
@tombarrett2306 3 жыл бұрын
Great video I have a question. When should a class (.cpp) be coupled with a header file (.h)? This has always confused me as I come from Java where this concept doesn't exist.
@koj2698
@koj2698 3 жыл бұрын
Just like java,you need to import required modules. But if you ask when to use class in header files, it reallys up to other .cpp files which will also utilize that class so instead of copying same class over and over,you will just include diffrrent .h files.
@merveguz3l
@merveguz3l 3 жыл бұрын
What is the difference between protected object and public object? I didn't understand that point.
@IngridFelfly
@IngridFelfly Жыл бұрын
You are amazing! Thank you for these videos, love the content!
@huseyinates7871
@huseyinates7871 3 жыл бұрын
Throughout the course you have defined all classes on the same document (at the top of your main method). This was really sad. Because doing it like this is not professional. I wish we had defined our classes in a separate folder (like a header file). Ok this course is acceptable as it is beginner level. I hope you start an advanced C++ OOP course because you are really good.
@fycs21ankushdiwakar68
@fycs21ankushdiwakar68 2 жыл бұрын
Concepts got cleared!!!
@mominashakoor2386
@mominashakoor2386 3 жыл бұрын
really helpful video but can you tell how to input a value given by a user in the constructor?
@TheDaveFung
@TheDaveFung 2 жыл бұрын
Thank you very much for the video 🙏🙏🙏
@nouhailabougattaya3062
@nouhailabougattaya3062 2 жыл бұрын
that was so so good thank you so much
@creative1978
@creative1978 Жыл бұрын
Wow You're amazing!!! Great explanation.
@khaledosamasheha857
@khaledosamasheha857 8 ай бұрын
thanks for your videos please where is your code in this videos
@GauravSingh-ku5xy
@GauravSingh-ku5xy 3 жыл бұрын
Thanks for these lessons.
@AdityaSingh-ui4tr
@AdityaSingh-ui4tr 3 жыл бұрын
link is in the description was op!
@jasnarmstrng
@jasnarmstrng Жыл бұрын
Brilliant!
@kates-creates
@kates-creates 10 ай бұрын
love this channel !!
@roros2512
@roros2512 3 жыл бұрын
10:18 is there any way to rename an object with some shortcut? doing this manually can be super hard if there are too many lines of code
@dev_kvcs
@dev_kvcs 3 жыл бұрын
im sure you found it already but right click the object(or variable or anything user defined really) and click rename. Intellisense will rename every instance
@andresborja9976
@andresborja9976 3 жыл бұрын
loving your channel!!!
@agent5420
@agent5420 3 жыл бұрын
May you please do a vid for Composition,
@ashrsfsiliman452
@ashrsfsiliman452 3 жыл бұрын
Thank you for your great job
@CodeBeauty
@CodeBeauty 3 жыл бұрын
😊🤗
@Saptarshi88
@Saptarshi88 10 ай бұрын
Amazing Video.
@gabi7112
@gabi7112 2 жыл бұрын
I have a very important examen the next week, I need help
@subee128
@subee128 2 жыл бұрын
Thanks
@kelolettek3927
@kelolettek3927 3 жыл бұрын
what is system("pause>0") ? why do we use it ?
@moutasemhussain
@moutasemhussain 3 жыл бұрын
It gets rid of noise when running or compiling code. It makes code look clean and easy to read.
@holyshit922
@holyshit922 4 жыл бұрын
Can you record video in your native language ? I would like to know can i understand your language I speak also slavic language but from Central Europe not from South
@CodeBeauty
@CodeBeauty 4 жыл бұрын
In response to the first version of your comment - I think that you can't blame a language for bad thing that people do. My channel will never be medium to judge anyone, but rather a way to share things that I learned and help others so that they don't have to make the same mistakes that I did or struggle with the same problems. I have been working as an educator on my language for a couple of years prior to this, and I started an English YT channel because it is a way to share the knowledge and help more people, and it is a way for me to learn and practice new things. I am still struggling with pronounciation of some words, thinking on english and speaking fluently, but I'm growing and making progress, and that is something that stays documented on YT. That can be used by other people to see that everything takes time, work and dedication, and that big things never come overnight. I still post on Facebook and Linked in on my language as well, and there are different types of videos on my social media that are on my language. I will be forever gratefull for all the support that I got from my country since the very beginning! 🥰
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Try this: kzbin.info/www/bejne/gofZXoR9rrxpZ7s It is my most recent video that I did for the UN campaign dedicated to recovering from COVID19. I've done it on my language, but it's subtitled as well. You can try to understand it and you have subtitles so that you can check. Let me know how it went. 😊
@holyshit922
@holyshit922 4 жыл бұрын
@@CodeBeauty Firstly I dislike what Americans do with our countries Secondly is it matter of blaming language ? I give you an example If Tesla had worked in your country and had published his work in your country Americans would not have gotten his work so easily Thanks for a video
@nuamaaniqbal6373
@nuamaaniqbal6373 2 жыл бұрын
Thank you!
@marselnaidenov725
@marselnaidenov725 3 жыл бұрын
Really helpful !
@piyushagrawal691
@piyushagrawal691 3 жыл бұрын
Your explaination is just amazing. thank you so much ☺️, Love from India 🔥🔥
@herbertk9266
@herbertk9266 4 жыл бұрын
Thank you
@chulbalytwins2450
@chulbalytwins2450 2 жыл бұрын
can you plz give code in your dicscription
@RelatableNoob
@RelatableNoob 10 ай бұрын
watching before exam day💀
@muhammadhuzaifa5395
@muhammadhuzaifa5395 3 жыл бұрын
Can you also upload videos on java concepts please☺
@basar.yt.f9115
@basar.yt.f9115 2 жыл бұрын
inheritanceing is not working for sub count and publish video.
@day4834
@day4834 2 жыл бұрын
it is working for me, going to paste my code so that you can compare: #include #include using std::cout; using std::cin; using std::endl; using std::string; using std::list; class KZbinChan { private: string Name; int SubscriberCount; list PublishedVids; protected: string OwnerName; public: KZbinChan(string name, string owner) { Name = name; OwnerName = owner; SubscriberCount = 0; } void getInfo() { cout
@sikulabathura7513
@sikulabathura7513 Жыл бұрын
great coding video, amazing lecture, BUT why in the DEVIL'S NMAE YOU HAVE LIGHT MODE ON! On starting the video i nearly burned my retina!
@arjunans5139
@arjunans5139 9 ай бұрын
If you have watched the previous video , click this 1:48
@clueloss5373
@clueloss5373 Жыл бұрын
Make another youtube channel and call it CookingBeauty. I would definitely subscribe lol
@CodeBeauty
@CodeBeauty Жыл бұрын
😁🥰🥰
@ismailyousfi3521
@ismailyousfi3521 2 жыл бұрын
Thenks
4 жыл бұрын
Thank you Beauty...
@ertugrulsaka1193
@ertugrulsaka1193 3 жыл бұрын
dammm im not good at english but you speaking so clearly so i can understand every word you said without subtitle.. you are our C++ queen
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🙏💙
@harshitraj1628
@harshitraj1628 2 жыл бұрын
All of your content is well described but you should at least programmed in seperates files for all of your video .
@tumusiimebrian3745
@tumusiimebrian3745 4 жыл бұрын
Thank you so much Saldina...hope in the next videos you can use my name in the examples ☺️ Brian
@hidemat5141
@hidemat5141 2 жыл бұрын
Are Apple pie and Chocolate cake your favorite desserts?
@CodeBeauty
@CodeBeauty 2 жыл бұрын
Hmmm, no, I like cookies and cream more ☺️
@hidemat5141
@hidemat5141 2 жыл бұрын
@@CodeBeauty nice
@lilgohan
@lilgohan 10 ай бұрын
please use dark mode :(
@CodeBeauty
@CodeBeauty 10 ай бұрын
All my new videos will be in dark mode 🕶🥷
@ordinary_man_84
@ordinary_man_84 Ай бұрын
5:29 a bit difficult to understand
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 1,1 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 10 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 84 МЛН
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 954 М.
What is INHERITANCE in C++? 👨‍👧‍👧
11:05
Bro Code
Рет қаралды 13 М.
Should I pass by const reference or by value?
10:45
The Cherno
Рет қаралды 107 М.
Friend functions and classes in C++ (Programming for beginners)
18:18
Angular Tutorial for Beginners: Learn Angular & TypeScript
2:02:42
Programming with Mosh
Рет қаралды 4,4 МЛН
Learn Java Object-Oriented Programming (with actual code)
29:44
ForrestKnight
Рет қаралды 23 М.
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 1,1 МЛН