Public Inheritance in C++ | Object Oriented Programming Video Tutorial

preview_player
Показать описание
In this c++ OOPS video tutorial, you will learn about the public inheritance.

You will learn what is public inheritance, what is the use of it, what happens to class members when it is used to inherit from the base class, how to access the members in derived class when it is used in detail with example.

Learn Programming in HINDI at our youtube channel

Catch us on SocialMedia
Рекомендации по теме
Комментарии
Автор

Learning Lad(Mr.Anil) :
I spend my winter holidays, semester break in learning c++ from your videos, they are really helpful. <3 <3

ayushman_sr
Автор

This videos are really helpful. Most important concepts in OOP are explained in such a lucid fashion that any average student who want to learn can easily understand it. As suggested by sanjay a tutorial series on any software project in Visual Basic would be highly appreciated as it would be useful in our college projects. Thanks a lot for this videos.!!

adityavora
Автор

Great teaching style.  I got the clear picture on how the classes really work from these videos, I  really appreciate the series of videos from Learning lad. I have a small suggestion, why don't you make a some small software project for example : students attendents system or employee managements systems or any thing of such kind in Visual studio using graphical interfaces and make it in to a series of videos (covering all the concepts in this series of C++ videos). so that the students can the learn how to create the software from scratch using these demonstrations. 

Thank You
Sanjay

sanjaypgsanju
Автор

The most important thing is public inheritance means "IS A". Protected & Private inheritance do not means "IS A", they mean, "IS IMPLEMENTED IN TERMS OF..."
So in the example, Student is a Person, and any time you have a function that take Person by pointer or reference, a Student will do.
All Student's are Person's, but not all Person's are Student's.
public inheritance is an an example of Barbara Liskov substitutability of types. Liskov is the L in the programming anacronym S.O.L.I.D.
Protected & Private inheritance can be substituted with composition (which is preferred).
So under what circumstances are Protected & Private inheritance preferred? Answer: When you need to provide a virtual function of the base class in the derived class. Composition cannot do this.

stephenhowe
Автор

Hello sir
what will we do when we want to access both protected and public member of the class
child :public human
this method is use to access public member what is the syntax of for accessing both public and protected

muhammadtalha
Автор

Nice explanation ..but i have a question let me say i created three different program example for teachers, non-academic staff and for stuff members. is there awqay i can make this as one program?

tobiastuyeni
Автор

in case of public inheritance, protected members of the base class sya A acts as private members of derived class say B right? if an another class say C derived from class B, then protected members of class A is no longer visible to class C right?

lokeshloki
Автор

I have a question is simple inheritance and public inheritance are same?? also is privacy for complex object is different from objects? is there any diff between the constructor and destructor of complex object and object??

unfairandlovely
Автор

I don't know how you able to run the program, without closing the second bracket

pupixyz
Автор

Here's a question for you....can you have a derived-class of a derived-class, and can the "derived-derived " class inherit properties /methods of the base class, (assuming all the access specifiers are public).

rodwynnejones