Hi everybody.
Welcome back.
In this video we will discuss Object Oriented Programming.
Magical Dunder missiles Dunder missives no missiles is used with constructor which is any missile.
Example underscore underscore Len underscore vanities as global entities and underscore David underscore
his third voters rank double underscore
member entities cross-border entities.
We use these missiles for specific functions like if we want to brand an object we can do that by using
an IT missile alone.
But we use double underscore to string double underscore or memory entities close parentheses missile
alone
and if we want to calculate the lens of an object we use double underscore and E N double underscore
embedded to the schools and entities missile let's try that in the end it method from the last value
we have glass that I use it.
Yes and it self name and age self the name equal one name fiftieth age equal age user underscore one
equals that the user was tougher and sixteen user underscored two that the user timer and 36.
We have this glass.
Let's bring User 1 Brent
User 1.
We will get that object in the memory of our glass mean that the user is a memory of our class that
uses plan of our user one.
We will get type error.
Our object of type that the user has no lens what we can do to me to bring to our user and measures
the lens we will use magical dander methods and with the constructor let's go and do that let's put
our magic string of missile he he's
year double underscored string self
grows by entities call them enter return
then if
user
name
is
get record growth and records.
And the has
to get it back in because we've got a record year.
That's for me.
That's the name for the main
cell.
The AIDS benefit of AIDS.
Yes.
Level underscore in the end double underscore.
Cell
return
cell that hits
tiff and then then we will bring user one
it will be granted so easy.
No problem.
We will calculate the length of user 1
we will get 16.
Also we will do that for user to rent user to
brain to use that to shift and enter user name is tamer and has seventy six years old and lengths of
user to
36.
Thank you for watching.
See you next lecture.