1
00:00:01,690 --> 00:00:02,680
Hi everyone.

2
00:00:02,680 --> 00:00:08,800
So today we will start on your topic called woops object oriented programming.

3
00:00:08,890 --> 00:00:16,930
So object oriented programming is a programming style that involves classes and objects classes and

4
00:00:17,020 --> 00:00:22,900
objects so in this class we will learn the meaning of these two terms.

5
00:00:22,900 --> 00:00:30,010
Now let us first understand the meaning of an object so object is a basic entity that possesses some

6
00:00:30,010 --> 00:00:33,210
properties and functions in real world.

7
00:00:33,220 --> 00:00:35,710
We are surrounded with objects everywhere.

8
00:00:35,890 --> 00:00:39,440
For example laptop is an object and is an object.

9
00:00:39,490 --> 00:00:40,760
Table is an object.

10
00:00:40,770 --> 00:00:48,550
Change is an object etc. We want to involve these objects into our code because we want our code as

11
00:00:48,550 --> 00:00:50,560
close as to the real world.

12
00:00:50,560 --> 00:00:55,270
Okay let us first take an example suppose we have a student object

13
00:01:00,200 --> 00:01:03,230
and let's say a student has property called Name

14
00:01:06,300 --> 00:01:11,140
property or lumber a property.

15
00:01:11,160 --> 00:01:19,100
Let's say each address property and let's say contact number

16
00:01:22,050 --> 00:01:28,890
so these are some properties of Student object and we have functions.

17
00:01:29,130 --> 00:01:30,890
So what other functions functions are.

18
00:01:30,890 --> 00:01:37,710
The operation that we can perform on an object so let us take an example we can have a function called

19
00:01:38,580 --> 00:01:44,510
change address we can have a function central number

20
00:01:47,910 --> 00:01:48,970
and so on.

21
00:01:48,990 --> 00:01:54,700
Okay so object are the basic entities that will have some properties and functions.

22
00:01:54,750 --> 00:01:56,040
Now us go into the deal

23
00:01:59,760 --> 00:02:02,880
Suppose I want to create 20 students

24
00:02:06,230 --> 00:02:09,350
each student will have some properties.

25
00:02:09,350 --> 00:02:14,310
So the student object will have some properties.

26
00:02:14,710 --> 00:02:18,250
Let's say current living have only three properties and no functions.

27
00:02:18,250 --> 00:02:27,520
Okay three property and no function name a general number three properties and we want to create 20

28
00:02:27,520 --> 00:02:28,610
students.

29
00:02:29,050 --> 00:02:38,260
So we will create student number one at will have name it will have age and district and will have rule

30
00:02:38,250 --> 00:02:47,930
number similarly we will have as to name age number as three name age.

31
00:02:47,930 --> 00:02:52,490
Rule number and so on we will create 20 such students.

32
00:02:52,700 --> 00:02:53,700
So if we create.

33
00:02:53,720 --> 00:02:56,570
So if we will create object using this method.

34
00:02:56,570 --> 00:02:58,720
So this is a very hectic method okay.

35
00:02:58,730 --> 00:02:59,990
It will take us a lot of time.

36
00:03:00,740 --> 00:03:05,120
So what we use is a template called class.

37
00:03:05,270 --> 00:03:07,540
So what we will do we will create a template.

38
00:03:10,690 --> 00:03:20,760
So this template we'll have three properties name rule number and age.

39
00:03:20,940 --> 00:03:21,700
Okay.

40
00:03:21,980 --> 00:03:23,000
We have a template.

41
00:03:24,630 --> 00:03:29,330
And this template has three properties name rule number and age.

42
00:03:29,400 --> 00:03:33,120
So what we will do we will create a copy of this template

43
00:03:38,380 --> 00:03:40,830
and we will name it as.

44
00:03:40,990 --> 00:03:42,860
So we will have a name.

45
00:03:43,030 --> 00:03:44,410
We will have a rule number.

46
00:03:44,740 --> 00:03:46,910
And we will have each.

47
00:03:46,990 --> 00:03:52,330
Now after creating the copy we will fill that data Latin name is ABC.

48
00:03:52,330 --> 00:03:55,360
Rule number is tool a just 23.

49
00:03:55,380 --> 00:03:55,910
Okay.

50
00:03:55,930 --> 00:04:00,250
So we created a copy and then we will fill data.

51
00:04:00,250 --> 00:04:01,930
Let's say we will create and copy

52
00:04:05,250 --> 00:04:07,950
the name of these copies as true.

53
00:04:08,090 --> 00:04:09,460
It will have a name.

54
00:04:09,690 --> 00:04:13,350
It will have rule number and it will have each.

55
00:04:13,530 --> 00:04:15,800
And now it's time to fill that data.

56
00:04:15,810 --> 00:04:18,380
So let's say your name is X Y Z.

57
00:04:18,390 --> 00:04:20,150
Rule number is 24.

58
00:04:20,580 --> 00:04:24,260
And ages 50 to OK.

59
00:04:24,360 --> 00:04:30,710
So this template is called a class.

60
00:04:31,110 --> 00:04:40,230
And this copy of template is called Object similarly if you want to create more objects.

61
00:04:40,240 --> 00:04:47,860
We can we will create a copy we will have three fields name rule number and age.

62
00:04:47,860 --> 00:04:49,950
And then we will fill our data.

63
00:04:49,980 --> 00:04:50,410
Okay.

64
00:04:50,500 --> 00:04:52,670
So we have only one class.

65
00:04:53,260 --> 00:04:57,770
And we can create many objects what we have to do.

66
00:04:57,900 --> 00:05:00,870
Just copy that template and fill the data.

67
00:05:00,900 --> 00:05:01,330
Okay.

68
00:05:01,380 --> 00:05:05,550
So this is much much better as compared to this way.

69
00:05:06,290 --> 00:05:06,820
Okay.

70
00:05:06,930 --> 00:05:13,710
So and so if we will create the object using this this is very cumbersome method because all the objects

71
00:05:13,710 --> 00:05:16,380
have these same properties name age and all number.

72
00:05:16,410 --> 00:05:23,930
So it is better to create a template and this template will be called a class and then we will make

73
00:05:23,940 --> 00:05:25,190
copy and fill data.

74
00:05:25,560 --> 00:05:25,860
Okay.

75
00:05:25,890 --> 00:05:31,860
So object is make the copy and filter data make a copy for the data.

76
00:05:31,860 --> 00:05:32,160
Okay.

77
00:05:36,240 --> 00:05:43,040
Now I hope you got a rough idea so I will become more clear as we go in detail in the future lessons.

78
00:05:43,620 --> 00:05:45,980
So I think this is enough for three.

79
00:05:46,020 --> 00:05:48,840
Now let us see the code how we will create class.

80
00:05:48,840 --> 00:05:55,960
Let us see through a code so I have made a file with the name student dot CPB.

81
00:05:56,030 --> 00:05:56,470
Okay.

82
00:05:56,590 --> 00:06:01,720
So for creating a class we first have to write class keyword.

83
00:06:01,720 --> 00:06:03,160
And then the name of the class.

84
00:06:03,850 --> 00:06:05,200
So the name of the classes.

85
00:06:05,230 --> 00:06:05,890
STUDENT.

86
00:06:06,420 --> 00:06:06,940
OKAY.

87
00:06:06,940 --> 00:06:09,130
Opening record closing record.

88
00:06:09,130 --> 00:06:16,840
And this semicolon so let's say uh currently we have only two properties.

89
00:06:16,850 --> 00:06:17,420
Rule number

90
00:06:20,430 --> 00:06:21,890
and the second property.

91
00:06:21,940 --> 00:06:23,820
Let's age.

92
00:06:24,060 --> 00:06:24,590
Okay.

93
00:06:24,780 --> 00:06:27,080
So this is a way to create a class.

94
00:06:27,090 --> 00:06:29,490
This does index for creating a class.

95
00:06:29,520 --> 00:06:34,190
Okay first class keyword then name of the class.

96
00:06:34,320 --> 00:06:36,250
And then the properties.

97
00:06:36,630 --> 00:06:39,000
Currently we do not have any functions.

98
00:06:39,030 --> 00:06:40,730
Okay now let's see.

99
00:06:40,730 --> 00:06:46,270
When for example so this is a class called the product NCP.

100
00:06:46,420 --> 00:06:46,760
Sorry.

101
00:06:46,770 --> 00:06:49,220
This is a file called product or TPB.

102
00:06:49,310 --> 00:06:56,980
Let's make a class so class keyword then name of the class and then the name of the class is product

103
00:06:57,840 --> 00:07:00,760
opening record closing record and semicolon.

104
00:07:00,980 --> 00:07:01,230
Okay

105
00:07:04,950 --> 00:07:06,690
let's see this product.

106
00:07:06,690 --> 00:07:09,520
This product class has three properties.

107
00:07:09,540 --> 00:07:12,240
First is I.T..

108
00:07:12,270 --> 00:07:20,040
Second is uh lower tech albeit and third is uh let's call the name of the product.

109
00:07:20,400 --> 00:07:26,060
So for name we have we need connectivity so connectivity.

110
00:07:26,100 --> 00:07:29,640
Let's say the size is 50 OK

111
00:07:34,410 --> 00:07:36,780
so we have a class called product.

112
00:07:36,780 --> 00:07:43,650
It has three properties I.T. vid and name and this doesn't have any functions yet.

113
00:07:44,520 --> 00:07:48,380
OK so now let us create object.

114
00:07:48,990 --> 00:07:52,430
So we will discuss in the next video How to create objects.

115
00:07:52,500 --> 00:08:00,060
So for objects what we have to do we have to make the copy of this class and then fill the data.

116
00:08:00,450 --> 00:08:02,100
Okay so let us revise.

117
00:08:03,000 --> 00:08:05,060
So what is the class.

118
00:08:05,310 --> 00:08:06,230
Classes.

119
00:08:06,520 --> 00:08:07,970
Basically a blueprint.

120
00:08:09,360 --> 00:08:12,100
Class is a blueprint.

121
00:08:12,470 --> 00:08:17,860
Let's take one more example let's say we have a class called God.

122
00:08:17,980 --> 00:08:18,570
Okay.

123
00:08:18,590 --> 00:08:19,540
Class God.

124
00:08:19,670 --> 00:08:30,320
So this GA template this class blueprint let's say have four properties uh name Marty Lambert

125
00:08:33,230 --> 00:08:36,590
let's say price and number of seats

126
00:08:40,230 --> 00:08:45,600
okay So class is a blueprint.

127
00:08:45,850 --> 00:08:52,840
Now we will make a copy C1.

128
00:08:52,890 --> 00:09:03,170
Now we will have all the properties name more lumber price and seat number of seats.

129
00:09:03,190 --> 00:09:06,230
And now it's time to fill the data.

130
00:09:06,250 --> 00:09:06,970
Okay.

131
00:09:06,970 --> 00:09:15,080
So let us the name is ABC model number two three forward price let's say 20 grand anti-gay and 30 seats

132
00:09:15,130 --> 00:09:15,580
are full.

133
00:09:16,560 --> 00:09:17,200
Okay.

134
00:09:17,530 --> 00:09:23,710
So this blueprint class is a blueprint so blueprint doesn't have data.

135
00:09:23,830 --> 00:09:24,190
Okay.

136
00:09:24,220 --> 00:09:26,200
These are empty.

137
00:09:26,200 --> 00:09:27,860
They are just the name of the field.

138
00:09:27,870 --> 00:09:31,460
They are only names that do not contain any data.

139
00:09:31,510 --> 00:09:36,040
If you want to fill the data what we will do we will make the copy of the template.

140
00:09:36,250 --> 00:09:40,430
Then we will have all the fields all the properties and then we will fill data.

141
00:09:40,480 --> 00:09:48,200
So objects are real world they are real while they are created after filling after filling the fields.

142
00:09:48,200 --> 00:09:49,160
Okay.

143
00:09:49,160 --> 00:09:55,820
So this is I always remember class using a blueprint class is a blueprint or a template

144
00:09:58,580 --> 00:10:01,400
and object to real voids.

145
00:10:01,400 --> 00:10:05,720
We will make the copy of the template and then we will fill the data.

146
00:10:05,720 --> 00:10:06,370
Okay.

147
00:10:06,710 --> 00:10:10,580
So in the next video we will learn how to create the object.

148
00:10:10,580 --> 00:10:11,820
Okay.

149
00:10:12,140 --> 00:10:17,720
In the next day we will learn how to create objects of class called product and objects of class called

150
00:10:17,930 --> 00:10:18,420
student.

151
00:10:19,220 --> 00:10:20,390
Okay thank you.
