In this lecture, we will learn in the seventies.
Class or class?
Inheritance.
Inheritance defines a class that inherently inherits all the methods, the properties from another class.
So there's a pair in the class.
It is the class being inherited a flaw also called base class.
So there's also out of the class it is that the class that
you've Harry's long another class also called derived class a whole class means we obtained this class
from not of course or this class of obtained law is pairing class.
Okay.
Let's create a parent class.
Any class can be a parent class was.
The syntax is the same as we create any other class here because we have already create a person class.
Let's just use this person class is our parent class because there are many other class has the same
property and Ewing same functions as these person class.
For example, student in the class or a family class or.
Implore employees class a source of all persons.
So let's just use this parent class already here.
But maybe I keep coming here.
He's the heroine.
The class.
No, we just agreed.
A one children class, for example, the student class.
But you're right.
Or low.
We just like class.
Student.
The class name and thing passed the.
Harry.
The class name is arguing.
Or as the parameter light based.
They we use plus.
Plus here means we needed to write any thing here.
All the functions and attributes are the same with the parent class.
Take the other same.
No.
We are successfully create the child across.
No.
For example, we.
Maybe we.
We can create a yeast sphere.
Here.
Maybe we just copy the.
For example.
We?
We have a student who went to class.
Yes.
Things.
Sorry.
We have yeast.
Heinz and they give some.
Arguments.
Yeah.
You can put it here.
You were all the same.
We ran the class thing.
We?
Stein.
I could miss.
Yeah.
But here.
Retasked right here, no less one.
No know.
For example, we test is out last.
Person one.
Student one No.
When you need one.
We have this things.
A phone number.
It's a record of the number.
STUDENT one.
Name.
Is drawing up student.
Why?
I mean, the E for punk scene.
Bank.
In for.
This function.
That's correct.
See?
Please join me.
20 years old.
This is Asia from Germany.
And it's a phone number.
It's here.
It works very well.
So if you have a parent class, you can define different the child across.
You needn't write the attributes or the functions because of the fear of the scene, the calming properties.
Okay.
This is all this is the course, this painful cost.
Okay.
Thank you.
Best of luck.