1
00:00:00,120 --> 00:00:04,500
Another mode of independence, multiple inheritance, which is also very simple.

2
00:00:04,530 --> 00:00:11,370
There is one subclass back that's a Blastoise inheriting from lot of main classes or base classes.

3
00:00:11,440 --> 00:00:15,930
OK, so Glasby and Glassie are being inherited by Class eight.

4
00:00:15,960 --> 00:00:23,430
So this is like more number of base classes, but I think subclass, so that scored multiple inheritance.

5
00:00:23,430 --> 00:00:29,430
So it's quite a feature in C++, very class, getting it done from more than one classes.

6
00:00:29,460 --> 00:00:33,440
OK, so one subclasses inherited from more than one base class.

7
00:00:33,450 --> 00:00:40,320
How you can either see index class subclass name, then this doctor, then you have to give that axis

8
00:00:40,320 --> 00:00:45,790
more base class one separated by comma axis, more base class two, etc. two.

9
00:00:45,810 --> 00:00:49,710
How many number you can define in number of classes to you mean ED.

10
00:00:49,710 --> 00:00:51,930
Then you can go with that body of subclass.

11
00:00:51,960 --> 00:00:53,700
Let's see a good example out here.

12
00:00:53,790 --> 00:00:58,480
Here we have a class named Victor and also class name for wena.

13
00:00:58,500 --> 00:01:03,510
And a third class is Escada, which is in how to think both the good and for.

14
00:01:03,830 --> 00:01:04,200
OK.

15
00:01:04,230 --> 00:01:11,480
And when you are creating an object of this class, you will be able to access all the other classes.

16
00:01:11,490 --> 00:01:17,340
You going to access both formula and you get access vehicle and again, see a construct at all here.

17
00:01:17,400 --> 00:01:22,920
So for we left, when you are creating the object of God board, these constructors will be card because

18
00:01:22,920 --> 00:01:29,590
this maker function is inherited by God, and this four-Wheeler function is also inherited by Deepak.

19
00:01:29,600 --> 00:01:32,070
So what will be the output of this program?

20
00:01:32,130 --> 00:01:32,750
It will be.

21
00:01:32,760 --> 00:01:35,610
This is a beta, and this is it for me.

22
00:01:35,610 --> 00:01:36,150
Let me.

23
00:01:36,180 --> 00:01:39,570
OK, now let's move to the third type of inheritance.

24
00:01:39,600 --> 00:01:41,670
We're just multilevel inheritance.

25
00:01:41,700 --> 00:01:42,720
This is also very.

26
00:01:43,230 --> 00:01:48,630
Suppose you have a base class named C and that these meaning headed by a class No.

27
00:01:48,630 --> 00:01:54,330
B and again class number B, serving as a base class four class number.

28
00:01:54,900 --> 00:01:59,150
This is quite multi level inheritance, so you can see multiple levels here.

29
00:01:59,160 --> 00:02:07,080
So one base class is acting as a subclass and at the same time, it is an asset based Class 14 other

30
00:02:07,080 --> 00:02:07,370
class.

31
00:02:07,380 --> 00:02:13,140
So there is like multiple levels of inheritance going on and this can be done in multiple levels.

32
00:02:13,410 --> 00:02:19,380
Any number of levels like you can have a number of levels and you're getting it from one class below

33
00:02:19,380 --> 00:02:23,850
that class and other classes coming in in that think we know that class and that class is coming in

34
00:02:23,850 --> 00:02:24,330
inheriting.

35
00:02:24,330 --> 00:02:25,640
So you can repeat this.

36
00:02:25,650 --> 00:02:26,760
Yeah, no, I'm fine.

37
00:02:26,880 --> 00:02:30,490
Anyway, this is going my deep level of inheritance.

38
00:02:30,490 --> 00:02:36,330
So at the right classes created from another derived class and this goes on, this is quite my dilemma.

39
00:02:36,420 --> 00:02:37,120
Inheritance.

40
00:02:37,170 --> 00:02:37,860
Let's see.

41
00:02:37,860 --> 00:02:43,610
Annex somber yet again sea based class Class B grade and it has been inherited by year four.

42
00:02:43,620 --> 00:02:45,660
Wheeler is inheriting public behavior.

43
00:02:45,660 --> 00:02:51,750
So this is this is all the constructor and every function will be coming out here and adalat God is

44
00:02:51,750 --> 00:02:58,080
inheriting the four-Wheeler and if you create the object of subclass, it will invoke the Construct

45
00:02:58,080 --> 00:02:59,940
Draft Board that base class A.

46
00:02:59,940 --> 00:03:06,340
So and we are creating an object for car space object that will invoke all these three functions.

47
00:03:06,360 --> 00:03:07,500
So this will show up.

48
00:03:07,530 --> 00:03:11,670
This is a very vehicle object with all the hillside vehicles and ask one.

49
00:03:11,670 --> 00:03:17,670
God has four wheels, so that will be the output bucket that is aboard the mighty Levitt inheritance.
