Hi everybody.
Welcome back.
In this video we will discuss Object Oriented Programming encapsulation encapsulation encapsulation
is one of the basis of what will be objective oriented programming which enables us to hide the internal
part of that object.
So developers get benefits as follows easy to use and object without knowing what is inside the object
code.
Change can be easily noticed and measured encapsulation provides us the mechanism of restriction.
The axis of two sum of objects components we can access to data through special missiles getter and
setters.
We will open our job at our notebook.
Let's go.
Let's open geometry notebook and code as follows.
We will create a class called my class class.
Then we will set our innocence and the parameters g f set H self and NUM and the fear that any sense
of the class to the parameters first that H equal num.
And finally we will define the gate on a method for our barometer.
Def get h retail cell dot H.
Then we will assign an object to the class which is name Sara equal my class and will since the age
of Sara sara
sara
dot dot set age
40 then will print the age of Sara brand Sara dot yet age
this error because we don't fear the self any sense to get our message.
We should do that self because then we will get 40
Sara that set age 40
Sara not get AIDS
as you see we can use theatre and to get us missiles doing both.
And to get data to our class.
Thank you for watching.
See you next lecture.