1
00:00:00,120 --> 00:00:00,930
Hello, dear friends.

2
00:00:01,020 --> 00:00:05,400
In this lesson, we will learn how to define a method in class.

3
00:00:05,970 --> 00:00:06,600
So let's start.

4
00:00:08,910 --> 00:00:12,120
So what we've learned so far about object oriented programming.

5
00:00:13,200 --> 00:00:21,210
I will share with you what we have learned in this table in every lesson until the end of our topic.

6
00:00:21,240 --> 00:00:22,980
OK, so we'll continue our lesson.

7
00:00:24,840 --> 00:00:31,640
First, we define a class named student and give some attributes like names or name grade class.

8
00:00:31,650 --> 00:00:35,970
No gender, birthdate, class student.

9
00:00:37,530 --> 00:00:40,170
Death in it self.

10
00:00:41,240 --> 00:00:42,980
Name, surname.

11
00:00:45,120 --> 00:00:45,750
Grade.

12
00:00:47,860 --> 00:00:49,600
Class number.

13
00:00:50,740 --> 00:00:53,530
Gender, birth date.

14
00:00:54,730 --> 00:01:03,400
Self doubt, name equals name, self-taught surname equals surname, self-doubt, grade equals grade

15
00:01:04,330 --> 00:01:07,390
self-doubt, class number equals class number.

16
00:01:09,660 --> 00:01:15,930
Self doubt, gender equals gender, self-taught birthdate equals birth date.

17
00:01:19,390 --> 00:01:20,000
OK, good.

18
00:01:20,020 --> 00:01:24,280
Our class is ready now create an object named student one.

19
00:01:24,880 --> 00:01:28,840
Student one student, John Doe.

20
00:01:30,090 --> 00:01:30,690
Third.

21
00:01:32,140 --> 00:01:33,730
One male.

22
00:01:35,150 --> 00:01:40,040
26 slash 08 slash 2010.

23
00:01:41,930 --> 00:01:43,220
Now let's check the details.

24
00:01:43,550 --> 00:01:45,320
Student one talked name.

25
00:01:46,190 --> 00:01:47,210
The result is John.

26
00:01:48,250 --> 00:01:50,350
Student one DKC Class No.

27
00:01:51,580 --> 00:01:52,630
The result is one.

28
00:01:54,480 --> 00:01:58,590
We have successfully created an object with the values that we set.

29
00:01:59,520 --> 00:02:05,640
Now let's try to create a method for showing the students information to us, but how do we do that?

30
00:02:06,750 --> 00:02:14,700
Well, just as we defined the init method, we can define as many methods as we want to a class.

31
00:02:15,150 --> 00:02:16,440
So let's try that.

32
00:02:17,630 --> 00:02:18,890
Class student.

33
00:02:20,950 --> 00:02:22,300
Death in it.

34
00:02:32,950 --> 00:02:37,270
Def show info, self print.

35
00:02:38,950 --> 00:02:40,510
Student information.

36
00:02:45,420 --> 00:02:51,990
All right, cool, so we can also use the backslash nd for a better look.

37
00:02:53,460 --> 00:02:55,320
Backslash and name.

38
00:02:59,610 --> 00:03:00,690
Self-taught name.

39
00:03:04,650 --> 00:03:06,720
Backslash and surname.

40
00:03:08,680 --> 00:03:10,060
Self-taught surname.

41
00:03:12,290 --> 00:03:16,370
Backslash in grade, self-support grade.

42
00:03:19,450 --> 00:03:21,910
Backslash and class number.

43
00:03:24,400 --> 00:03:25,870
Self-taught class, no.

44
00:03:34,430 --> 00:03:35,630
And gender.

45
00:03:38,720 --> 00:03:39,950
Self-doubt, gender.

46
00:03:43,940 --> 00:03:45,830
Backslash and birth date.

47
00:03:47,610 --> 00:03:49,200
Self-taught birth date.

48
00:03:52,890 --> 00:03:53,490
Cool.

49
00:03:53,700 --> 00:03:58,260
So now create another object name student to and give some details.

50
00:04:02,010 --> 00:04:02,550
Jack?

51
00:04:04,250 --> 00:04:04,850
Though.

52
00:04:07,750 --> 00:04:09,490
Fourth to.

53
00:04:12,150 --> 00:04:15,570
Male 10 Sep oh.

54
00:04:18,740 --> 00:04:20,090
Let's make him young, 2009.

55
00:04:20,720 --> 00:04:23,120
So let's check the information with our new menat.

56
00:04:24,080 --> 00:04:27,200
Student two Don't show info.

57
00:04:29,680 --> 00:04:32,770
And look at that, as you can see, our method is working.

58
00:04:32,800 --> 00:04:37,360
So in this lesson, we learned how to define a method in QUAT.

59
00:04:38,470 --> 00:04:39,730
So I want to see in the next lesson.

60
00:04:40,120 --> 00:04:40,780
Have a nice day.
