1 00:00:07,890 --> 00:00:08,940 Hi everybody. 2 00:00:08,940 --> 00:00:10,810 Welcome back. 3 00:00:10,830 --> 00:00:20,910 In this video we will discuss Object Oriented Programming encapsulation encapsulation encapsulation 4 00:00:20,910 --> 00:00:28,530 is one of the basis of what will be objective oriented programming which enables us to hide the internal 5 00:00:28,530 --> 00:00:30,120 part of that object. 6 00:00:30,120 --> 00:00:38,910 So developers get benefits as follows easy to use and object without knowing what is inside the object 7 00:00:39,330 --> 00:00:40,290 code. 8 00:00:40,350 --> 00:00:47,870 Change can be easily noticed and measured encapsulation provides us the mechanism of restriction. 9 00:00:48,110 --> 00:00:56,730 The axis of two sum of objects components we can access to data through special missiles getter and 10 00:00:56,730 --> 00:00:57,540 setters. 11 00:00:57,540 --> 00:01:00,130 We will open our job at our notebook. 12 00:01:00,210 --> 00:01:01,440 Let's go. 13 00:01:01,440 --> 00:01:06,380 Let's open geometry notebook and code as follows. 14 00:01:06,930 --> 00:01:15,120 We will create a class called my class class. 15 00:01:17,130 --> 00:01:33,240 Then we will set our innocence and the parameters g f set H self and NUM and the fear that any sense 16 00:01:33,300 --> 00:01:42,360 of the class to the parameters first that H equal num. 17 00:01:42,510 --> 00:01:51,630 And finally we will define the gate on a method for our barometer. 18 00:01:51,630 --> 00:02:01,120 Def get h retail cell dot H. 19 00:02:01,230 --> 00:02:16,020 Then we will assign an object to the class which is name Sara equal my class and will since the age 20 00:02:16,020 --> 00:02:19,170 of Sara sara 21 00:02:22,770 --> 00:02:23,300 sara 22 00:02:26,270 --> 00:02:31,790 dot dot set age 23 00:02:35,820 --> 00:02:49,220 40 then will print the age of Sara brand Sara dot yet age 24 00:02:58,550 --> 00:03:05,060 this error because we don't fear the self any sense to get our message. 25 00:03:05,750 --> 00:03:12,620 We should do that self because then we will get 40 26 00:03:15,630 --> 00:03:24,180 Sara that set age 40 27 00:03:28,070 --> 00:03:32,090 Sara not get AIDS 28 00:03:36,210 --> 00:03:40,940 as you see we can use theatre and to get us missiles doing both. 29 00:03:41,010 --> 00:03:43,820 And to get data to our class. 30 00:03:43,830 --> 00:03:45,030 Thank you for watching. 31 00:03:45,030 --> 00:03:47,230 See you next lecture.