1
00:00:02,390 --> 00:00:03,080
Hello everyone.

2
00:00:03,080 --> 00:00:09,350
So in this video we will learn about operator overloading operator overloading means that we can extend

3
00:00:09,380 --> 00:00:15,860
the functionality of the existing operators such that it will work for our user defined classes also.

4
00:00:15,950 --> 00:00:19,150
So in the last session we created this friction class.

5
00:00:19,160 --> 00:00:21,080
Now what I want is.

6
00:00:21,080 --> 00:00:23,000
So our aim is very simple.

7
00:00:23,000 --> 00:00:28,150
What we want is EF 3 is EF 1 plus EF 2.

8
00:00:28,160 --> 00:00:29,690
I want to do something like this.

9
00:00:30,200 --> 00:00:33,650
So currently if we will ride this treatment then this treatment is wrong.

10
00:00:33,650 --> 00:00:34,220
Why.

11
00:00:34,250 --> 00:00:41,750
Because the plus operator is not defined for our affection class but if I will write in C is A plus

12
00:00:41,750 --> 00:00:42,560
B.

13
00:00:42,980 --> 00:00:44,320
Then this line is right.

14
00:00:44,380 --> 00:00:44,940
Why.

15
00:00:44,990 --> 00:00:50,390
Because this plus operator is defined internally for doubles and for integers.

16
00:00:50,410 --> 00:00:50,650
Okay.

17
00:00:50,690 --> 00:00:51,800
So this line is wrong.

18
00:00:51,800 --> 00:00:52,350
Why.

19
00:00:52,370 --> 00:00:55,830
Because the plus operator is not defined for our fictional class.

20
00:00:56,100 --> 00:00:57,420
Salary is very simple.

21
00:00:57,440 --> 00:00:59,460
We wanted to make this line book.

22
00:00:59,630 --> 00:01:01,850
We wanted to make this treatment work.

23
00:01:02,060 --> 00:01:02,560
Okay.

24
00:01:02,570 --> 00:01:06,830
So what we want is we want to extend the functionality of this plus operator.

25
00:01:07,010 --> 00:01:12,860
We want to extend the functionality of this plus operator so that this press operator can work for our

26
00:01:12,860 --> 00:01:14,400
function class.

27
00:01:14,420 --> 00:01:17,630
Now this process is called operator overloading.

28
00:01:17,660 --> 00:01:18,260
Okay.

29
00:01:18,260 --> 00:01:21,230
So now we have to learn how to overload operator.

30
00:01:21,350 --> 00:01:24,200
So let us see this added function.

31
00:01:24,320 --> 00:01:28,960
So how we would call this added function we will call it with the help of an object.

32
00:01:29,060 --> 00:01:33,420
So if one dot Ed and then the argument will pass affliction F2.

33
00:01:33,440 --> 00:01:36,410
So what it will do it will add two numbers.

34
00:01:36,430 --> 00:01:41,170
One it will add two fictions f1 plus F2 and it will store that is our then F1.

35
00:01:41,750 --> 00:01:42,220
Okay.

36
00:01:42,290 --> 00:01:44,090
So this is what this code will do.

37
00:01:44,900 --> 00:01:48,740
Now let us first change the functionality of this add function.

38
00:01:48,740 --> 00:01:50,210
So what this area functions will do.

39
00:01:50,270 --> 00:01:55,840
It will add two fractions f1 plus F2 and it will stored the desert in New Fiction.

40
00:01:55,910 --> 00:01:59,760
It will create the new function and it will return new friction.

41
00:01:59,780 --> 00:02:09,800
So how we will call this function friction F3 we will call this add function f dot add and it will big

42
00:02:09,820 --> 00:02:11,140
F to his argument.

43
00:02:11,160 --> 00:02:14,000
Okay so this is our aim currently.

44
00:02:14,030 --> 00:02:18,400
Let us change let's first change the functionality of the add function.

45
00:02:18,410 --> 00:02:24,080
Okay so what desired function will do it will create a new function F3 and it will return the new friction

46
00:02:24,200 --> 00:02:26,930
F1 and F2 both will remain unchanged.

47
00:02:27,460 --> 00:02:27,950
Okay.

48
00:02:28,040 --> 00:02:29,210
So how can we do this.

49
00:02:29,540 --> 00:02:32,310
So let's see.

50
00:02:32,390 --> 00:02:37,610
So first of all let us copy this function okay.

51
00:02:37,630 --> 00:02:40,070
So let's make change in this function only.

52
00:02:40,070 --> 00:02:41,810
So what will the return type.

53
00:02:41,810 --> 00:02:47,440
Now the return type will be a fraction because we will done a new fraction okay.

54
00:02:47,480 --> 00:02:53,340
So currently what we are doing here is I am changing the numerator and denominator affection F1.

55
00:02:53,780 --> 00:02:57,890
So let's come on down this called.

56
00:02:57,920 --> 00:03:06,010
So what we have to do we have to create a new friction and then we will return that friction so friction

57
00:03:06,160 --> 00:03:08,640
f new let's name it f new.

58
00:03:08,710 --> 00:03:09,970
So what will be the numerator.

59
00:03:10,450 --> 00:03:14,360
So numerator will be and new him and the denominator will be LC.

60
00:03:15,130 --> 00:03:15,700
Okay.

61
00:03:15,760 --> 00:03:22,510
So what will happen at this line Batam at base constructively be called and now object will be created.

62
00:03:22,510 --> 00:03:23,020
Okay.

63
00:03:23,170 --> 00:03:32,040
So Batman tries to construct that called and now our object is ready okay.

64
00:03:32,310 --> 00:03:35,910
So after doing this we have to call simplify function.

65
00:03:35,910 --> 00:03:40,830
So currently if so currently the simplify means this it'll simplify.

66
00:03:40,830 --> 00:03:46,640
So this simplify function is being called on F1 so we have to change it.

67
00:03:46,640 --> 00:03:50,240
What we will do we will write f new DOT.

68
00:03:50,270 --> 00:03:50,930
Simplify.

69
00:03:51,390 --> 00:03:53,340
Okay so the new objective new.

70
00:03:53,390 --> 00:03:59,780
So the new function if new will get simplified and then we will have done this new friction so redone

71
00:03:59,780 --> 00:04:00,970
done.

72
00:04:01,430 --> 00:04:02,530
F new.

73
00:04:02,540 --> 00:04:03,390
Okay.

74
00:04:03,410 --> 00:04:05,960
So this is all that we have to do.

75
00:04:06,020 --> 00:04:06,250
Okay.

76
00:04:06,260 --> 00:04:08,020
So let's test our code.

77
00:04:08,060 --> 00:04:12,530
So currently we have these two factions friction F1 and friction F2.

78
00:04:13,550 --> 00:04:16,160
Okay so let's make a friction F3

79
00:04:20,440 --> 00:04:24,790
so this friction F3 is the addition of F1 and F2.

80
00:04:25,540 --> 00:04:31,980
So F1 not add and we will give F too okay.

81
00:04:32,200 --> 00:04:36,850
So now let us Sprint F1 F2 150 so F1 dot print

82
00:04:39,970 --> 00:04:41,000
after dark print

83
00:04:43,830 --> 00:04:50,230
and similarly F three dart print.

84
00:04:50,290 --> 00:04:51,680
Now let's turn our program.

85
00:04:51,700 --> 00:04:53,760
So first we will compile this file.

86
00:04:54,250 --> 00:04:57,250
And now we will run this file okay.

87
00:04:57,260 --> 00:04:58,630
So there is something wrong here.

88
00:05:07,110 --> 00:05:08,980
And it was not declared in the scope.

89
00:05:08,980 --> 00:05:09,270
Okay

90
00:05:27,870 --> 00:05:28,070
okay.

91
00:05:28,080 --> 00:05:29,360
So now let us on this file

92
00:05:32,740 --> 00:05:33,850
and now we will run this way

93
00:05:39,150 --> 00:05:42,850
so we can see here the value of have fun and F2 remains unchanged.

94
00:05:42,870 --> 00:05:47,190
And this is how it is and F3 which is the addition of friction F1 and F2.

95
00:05:48,210 --> 00:05:51,980
Okay so now what I want.

96
00:05:52,110 --> 00:06:00,420
So our aim is very simple what I want to do is I will create a new function function f word.

97
00:06:01,360 --> 00:06:07,510
So I want to create a new friction friction effort and I will write F1 plus F2.

98
00:06:07,510 --> 00:06:10,530
And the result will be theme is friction F3.

99
00:06:10,670 --> 00:06:13,280
Okay so I want the same functionality.

100
00:06:13,330 --> 00:06:18,220
So this plus operator will do exactly the same work which the add function needs to do.

101
00:06:19,030 --> 00:06:19,540
Okay.

102
00:06:19,630 --> 00:06:25,720
So the functionality will be same but I want to use plus operator instead of this add function.

103
00:06:25,780 --> 00:06:28,680
Okay so let's see in code how to do this.

104
00:06:29,050 --> 00:06:29,950
Okay.

105
00:06:34,530 --> 00:06:36,300
So let's copy their function

106
00:06:43,740 --> 00:06:47,550
so what I did is I only just copied their function.

107
00:06:47,550 --> 00:06:49,320
Now how to use operator overloading.

108
00:06:49,320 --> 00:06:51,600
So first we have to write the keyword operator.

109
00:06:53,010 --> 00:06:54,740
So operator is the keyword.

110
00:06:54,840 --> 00:06:58,620
And then you have to write the operator which you want to overload.

111
00:06:58,620 --> 00:07:00,510
So we want to overload plus operator.

112
00:07:00,510 --> 00:07:01,500
So without space.

113
00:07:01,500 --> 00:07:01,860
Right.

114
00:07:01,920 --> 00:07:04,160
Plus okay.

115
00:07:04,400 --> 00:07:05,720
So that's all.

116
00:07:05,750 --> 00:07:07,660
You only have to do this much work.

117
00:07:07,780 --> 00:07:10,090
Everything the functionality will remain the same.

118
00:07:10,100 --> 00:07:14,570
You just change the function name to operate a keyword and then plus.

119
00:07:14,590 --> 00:07:14,860
Okay.

120
00:07:14,870 --> 00:07:21,020
So no need to do anything extra so that it's cleared and the friction function effort

121
00:07:24,560 --> 00:07:27,960
to function F4 will be EF 1 plus 2.

122
00:07:28,010 --> 00:07:30,150
So if one plus EF 2.

123
00:07:30,990 --> 00:07:33,120
Okay now let's turn our file.

124
00:07:33,410 --> 00:07:36,380
So first we will run this one.

125
00:07:36,380 --> 00:07:38,610
And now we will win this fight.

126
00:07:39,320 --> 00:07:39,700
OK.

127
00:07:39,710 --> 00:07:42,260
So we forgot to print before.

128
00:07:43,130 --> 00:07:49,100
So let's print a foot F4 dot print now do it's and this will

129
00:07:52,560 --> 00:07:59,850
so we can see here F4 is also five by four solver code is working so we can see here it is very easy

130
00:07:59,850 --> 00:08:00,750
to overload operator.

131
00:08:00,780 --> 00:08:02,760
Now let's see how it is working.

132
00:08:02,790 --> 00:08:03,320
Okay.

133
00:08:08,630 --> 00:08:09,500
So we'll see this line.

134
00:08:09,500 --> 00:08:22,540
What will happen if when dot Ed EF 2 so this EF 1 will go in this this keyword of the add function and

135
00:08:22,540 --> 00:08:24,670
this EF 2 is posties argument

136
00:08:27,350 --> 00:08:27,920
OK.

137
00:08:28,060 --> 00:08:32,520
Now see this line EF 1 plus EF 2.

138
00:08:32,820 --> 00:08:35,150
Now a brand on the left hand side of the operator.

139
00:08:35,200 --> 00:08:37,610
This will go in this function.

140
00:08:37,610 --> 00:08:45,920
This keyword of the dysfunction and F2 will go in the argument okay.

141
00:08:46,020 --> 00:08:52,350
So the left hand side or brand will go in this and the right hand side argument will go in the argument

142
00:08:52,890 --> 00:09:00,280
and which function it will call it will call the function operator plus operator plus function will

143
00:09:00,280 --> 00:09:01,350
be called.

144
00:09:01,360 --> 00:09:10,120
So this will contain F1 and F2 will be biased s argument to this function operator plus function.

145
00:09:10,220 --> 00:09:14,320
Okay so now let us overlord multiply operator also.

146
00:09:14,340 --> 00:09:22,280
So what I want is I will create a new fraction function EF 3 and this friction EF 3 will be the multiplication

147
00:09:22,280 --> 00:09:24,080
of 2 friction F1 and F2.

148
00:09:24,680 --> 00:09:27,050
So we will overload this much space operator.

149
00:09:27,110 --> 00:09:35,620
So this EF 1 will go in this and EF 2 will be passed is argument similar to this similar to our function.

150
00:09:35,660 --> 00:09:36,100
Okay.

151
00:09:36,230 --> 00:09:41,420
We do not need to parse two arguments we just need to pass one argument because the better one will

152
00:09:41,420 --> 00:09:43,040
go in this.

153
00:09:43,040 --> 00:09:45,650
Okay so let this overlord multiply operator

154
00:09:48,840 --> 00:09:55,440
so this is want to pay operator so what we let it down type it and type will be fraction because we

155
00:09:55,440 --> 00:10:00,540
will create a new friction and then we will return that friction so we don't have really friction then

156
00:10:01,080 --> 00:10:01,740
the keyword.

157
00:10:01,800 --> 00:10:07,130
Operator And then the operator which we want to overload.

158
00:10:07,140 --> 00:10:17,020
So we want to multiply operator so multiply what it will take it will take a function as input function

159
00:10:17,060 --> 00:10:25,780
F2 and then what we will do we will calculate the numerator and denominator so in the numerator which

160
00:10:25,780 --> 00:10:34,990
is f one numerator or we can write this at a numerator multiply the numerator of f one Saudi multiple

161
00:10:34,990 --> 00:10:36,190
numerator of F2.

162
00:10:36,190 --> 00:10:42,930
So after nought numerator similarly it describes with their denominator so denominator is.

163
00:10:43,380 --> 00:10:54,750
Do I mean it drove F1 or we can write this letter denominator multiply by the denominator of F2.

164
00:10:54,800 --> 00:10:59,770
Okay so now let us create new friction which we will have done.

165
00:10:59,850 --> 00:11:07,620
So friction let's name it f new so the numerator will be N and their denominator is d again copy constructor

166
00:11:07,710 --> 00:11:13,140
sorry again parameters construct that will be called here and then we have to call simplify function.

167
00:11:13,140 --> 00:11:13,400
Okay.

168
00:11:13,410 --> 00:11:15,450
So the functionality will remain the same.

169
00:11:15,450 --> 00:11:17,180
We are falling this only.

170
00:11:17,340 --> 00:11:19,890
Okay so the function level doing the same.

171
00:11:19,890 --> 00:11:22,020
Now we have to call simplify function.

172
00:11:22,020 --> 00:11:24,780
We have to call simplify function on the new object.

173
00:11:24,840 --> 00:11:25,730
F new.

174
00:11:25,740 --> 00:11:27,890
So we have to write f new DOT.

175
00:11:27,900 --> 00:11:35,170
Simplify if you will simply write simplify then that means this to simplify simplify function we got

176
00:11:35,180 --> 00:11:42,900
called on F1 but we have to call on f new so after simplifying we will have done f new.

177
00:11:43,190 --> 00:11:45,290
Okay so that's all we have to do.

178
00:11:45,590 --> 00:11:46,430
So what will happen

179
00:11:50,870 --> 00:11:59,890
when we will write fiction F3 is F1 multiply F2.

180
00:11:59,890 --> 00:12:04,290
So the left hand open and the first print will go in this.

181
00:12:04,450 --> 00:12:11,940
So this numerator means F one dart numerator what we can write this at a numerator and this F2 will

182
00:12:11,970 --> 00:12:15,550
go in the argument okay.

183
00:12:15,630 --> 00:12:22,390
So this is how we overload multiply or pretend so this is how we overload multiply Roberta.

184
00:12:22,390 --> 00:12:29,560
Now let us try to overload one more operator which is equal to equal to so I know what we want is I

185
00:12:29,560 --> 00:12:32,290
want to overload this operator equal equal operator.

186
00:12:32,410 --> 00:12:34,470
So what this equal equal operator will do.

187
00:12:34,570 --> 00:12:42,220
I will give two fractions F1 and F2 and if the two factions are equal I will print equal if the two

188
00:12:42,220 --> 00:12:45,420
factions are not equal then I will print not equal.

189
00:12:45,820 --> 00:12:53,440
So in the main function in the main program the syntax will be if friction F1 equals equals friction

190
00:12:53,490 --> 00:13:01,340
F2 then we will see out equal otherwise they are not equal.

191
00:13:01,400 --> 00:13:10,150
So in the S and the else part we will write not equal okay.

192
00:13:10,410 --> 00:13:11,820
So where do the return type.

193
00:13:11,820 --> 00:13:16,610
Okay so first of all this thing will go into this function.

194
00:13:16,620 --> 00:13:20,280
This key word of the function and F F2 will go in the argument

195
00:13:23,560 --> 00:13:27,880
and which function we will call we will call the function with the name operator equal equal.

196
00:13:28,720 --> 00:13:32,850
Okay so let's say in code.

197
00:13:32,890 --> 00:13:39,310
So first of all what will the return type return type will be bool because we will return true or false.

198
00:13:39,310 --> 00:13:45,430
So bool what will the name first of all we have the right operator keyword then the name of the operator

199
00:13:45,520 --> 00:13:46,770
which we want to overload.

200
00:13:46,780 --> 00:13:49,380
So we want to hold equal call operator.

201
00:13:49,810 --> 00:13:57,100
So it will take one function as input function F two because the first function will go in this and

202
00:13:57,100 --> 00:13:59,590
then we have to return either true or false.

203
00:13:59,770 --> 00:14:05,050
So render two functions are equal when the numerator and denominator both Harry Kewell then we can say

204
00:14:05,050 --> 00:14:12,010
the functions are equal Okay so numerator and denominator both will be equal then we will say the two

205
00:14:12,010 --> 00:14:19,690
factions are equal so when numerator of f one consequence numerator of f F2

206
00:14:23,260 --> 00:14:32,140
and denominator has to be equal so denominator of f one equals equals denominator of F.

207
00:14:32,190 --> 00:14:37,510
So afterward denominator OK.

208
00:14:37,750 --> 00:14:43,550
So so this condition will either be true or this condition will either be false.

209
00:14:43,570 --> 00:14:46,450
So accordingly we will return true or false.

210
00:14:46,450 --> 00:14:48,250
Okay so that's all.

211
00:14:48,250 --> 00:14:52,140
Now let's end this way okay.

212
00:14:52,150 --> 00:14:53,320
So there is something wrong

213
00:14:58,940 --> 00:14:59,160
okay.

214
00:14:59,170 --> 00:15:05,630
So there's a spelling mistake.

215
00:15:05,750 --> 00:15:06,930
Now this is right.

216
00:15:06,960 --> 00:15:10,200
Let's compile the file okay.

217
00:15:10,220 --> 00:15:13,240
So now we will test our multiplying operator.

218
00:15:13,290 --> 00:15:13,740
And now what.

219
00:15:13,740 --> 00:15:14,800
Equal equal operator.

220
00:15:14,910 --> 00:15:26,220
Okay so we have to test two things so let's make let's create a friction friction a five which is the

221
00:15:26,220 --> 00:15:31,670
multiplication of F1 friction and F2 friction.

222
00:15:31,740 --> 00:15:32,650
Okay.

223
00:15:32,730 --> 00:15:33,580
And F five.

224
00:15:33,580 --> 00:15:34,140
BROADBENT

225
00:15:37,530 --> 00:15:40,920
And now we have the best outward equal equal or greater.

226
00:15:40,980 --> 00:15:45,070
So if F1 equals equals F2

227
00:15:48,760 --> 00:15:51,670
C out equal

228
00:16:00,870 --> 00:16:01,620
it's not equally

229
00:16:10,220 --> 00:16:10,490
okay.

230
00:16:10,500 --> 00:16:12,300
So let's all let's say now fighting.

231
00:16:17,020 --> 00:16:20,130
So this is our safety and this is I want a full.

232
00:16:20,500 --> 00:16:24,660
And this is our EF 5 so EF 5 is no duplication of a friend of 2.

233
00:16:24,670 --> 00:16:26,410
So I hope Don said is right.

234
00:16:26,470 --> 00:16:28,660
And then and finally off to an article.

235
00:16:28,660 --> 00:16:32,160
So that's why our output is not equal.

236
00:16:32,260 --> 00:16:37,180
So if I write F when equal equal F1 then that would put will be equal.

237
00:16:37,200 --> 00:16:39,630
Okay so let's see.

238
00:16:39,640 --> 00:16:43,390
So this time output is equal because F1 is different.

239
00:16:43,390 --> 00:16:45,310
Both sides seem okay.

240
00:16:45,460 --> 00:16:47,190
So that's how V O Lord our operator.

241
00:16:47,980 --> 00:16:50,030
So our work is not done here.

242
00:16:50,050 --> 00:16:54,220
Our work is not done here yet because we have to do some optimization.

243
00:16:54,310 --> 00:16:54,720
Okay.

244
00:16:54,790 --> 00:16:56,480
So what kind of optimization.

245
00:16:56,500 --> 00:17:02,700
So if you remember this add function this add function is taking F2 by reference and it will took constant

246
00:17:02,700 --> 00:17:03,420
reference.

247
00:17:03,430 --> 00:17:06,220
So first of all biodefense why we need to biodefense.

248
00:17:06,490 --> 00:17:11,910
So to avoid calling copy construct but because we do not need to call copy constructor and write constant.

249
00:17:12,340 --> 00:17:16,450
So we need a constraint to avoid illegal changes in F too.

250
00:17:16,520 --> 00:17:18,580
Okay.

251
00:17:18,830 --> 00:17:20,060
This is our plus operator.

252
00:17:20,080 --> 00:17:20,380
Okay.

253
00:17:20,390 --> 00:17:24,760
So here we have to read and optimization question defense.

254
00:17:24,860 --> 00:17:27,550
Now can we do optimization so this is multiply.

255
00:17:27,590 --> 00:17:29,740
And operator multiply.

256
00:17:29,750 --> 00:17:33,410
So here we should pass by reference.

257
00:17:33,710 --> 00:17:34,060
Okay.

258
00:17:34,080 --> 00:17:41,410
Constant reference because we do not need to call copy constructor here and also we want to avoid illegal

259
00:17:41,420 --> 00:17:42,180
changes.

260
00:17:42,200 --> 00:17:42,480
Okay.

261
00:17:42,500 --> 00:17:44,140
So that's why constant offense.

262
00:17:44,150 --> 00:17:51,810
And similarly we want to avoid calling copy constructor and we want to avoid any legal changes so question

263
00:17:51,840 --> 00:17:53,340
reference.

264
00:17:53,500 --> 00:17:56,910
Okay so no one more thing.

265
00:17:56,980 --> 00:18:00,710
Now we have now we know about constraint functions also.

266
00:18:00,730 --> 00:18:01,000
Okay.

267
00:18:01,000 --> 00:18:06,040
So what that constraint functions constraint functions are does function that will not change the property

268
00:18:06,040 --> 00:18:07,570
of the current object.

269
00:18:07,570 --> 00:18:08,190
Okay.

270
00:18:08,390 --> 00:18:10,570
That will not change the property of the current object.

271
00:18:10,660 --> 00:18:12,790
So let's say this function equal equal.

272
00:18:12,820 --> 00:18:16,020
So will this function change the property of f 1.

273
00:18:16,120 --> 00:18:16,450
Okay.

274
00:18:16,480 --> 00:18:19,010
So no it is not changing the property.

275
00:18:19,120 --> 00:18:21,310
So this function is a constraint function.

276
00:18:21,340 --> 00:18:24,430
So Mark this function is a constraint function.

277
00:18:24,430 --> 00:18:24,960
Okay.

278
00:18:25,120 --> 00:18:27,400
Now let's say this function and multiply function.

279
00:18:27,400 --> 00:18:30,480
So this multiply function changes the property of the current object.

280
00:18:30,550 --> 00:18:34,080
So the current object is F1 no object which is calling the function.

281
00:18:34,660 --> 00:18:36,330
So numerator and denominator.

282
00:18:36,340 --> 00:18:37,780
No it is not changing.

283
00:18:37,780 --> 00:18:39,820
It is creating a new friction.

284
00:18:39,820 --> 00:18:40,050
Okay.

285
00:18:40,060 --> 00:18:44,670
So this function is qualified to be a constraint function.

286
00:18:44,700 --> 00:18:46,620
Now let's see this multiply function.

287
00:18:46,620 --> 00:18:50,980
So this multiplied function is changing the numerator and denominator of the current object.

288
00:18:51,000 --> 00:18:54,240
So this multiply function is not a constant function.

289
00:18:54,240 --> 00:18:57,910
Let's see the plus function the operator plus function.

290
00:18:57,930 --> 00:19:03,870
So this function is creating a new function and it is changing the properties of the new fractions.

291
00:19:03,870 --> 00:19:07,310
It is not changing the properties of the current object.

292
00:19:07,350 --> 00:19:07,880
Okay.

293
00:19:08,010 --> 00:19:09,320
We have commented it out.

294
00:19:09,720 --> 00:19:13,710
It is not changing the properties of the current object since it is not changing the properties of the

295
00:19:13,710 --> 00:19:14,460
current object.

296
00:19:14,460 --> 00:19:21,500
This is also a constant function and similarly this is also not changing the properties.

297
00:19:21,580 --> 00:19:23,530
So this is also a constraint function

298
00:19:32,580 --> 00:19:35,010
so everything is working fine.

299
00:19:35,160 --> 00:19:35,610
Okay.

300
00:19:35,730 --> 00:19:41,700
So in this video we only ordered three operators plus multiply and equally call operator in the next

301
00:19:41,700 --> 00:19:44,430
session we will overload somewhat operators.

302
00:19:44,460 --> 00:19:45,070
Okay.

303
00:19:45,270 --> 00:19:45,690
Thank you.
