1
00:00:00,750 --> 00:00:06,330
So now inside of these practices of this company and device first of all we need to actually specify

2
00:00:06,330 --> 00:00:07,330
the company name.

3
00:00:07,410 --> 00:00:07,940
OK.

4
00:00:08,010 --> 00:00:14,390
So now I actually paste a piece of code here and then I'll explain to you what's going on here.

5
00:00:15,300 --> 00:00:18,830
So as you can see here this is the company's Arey OK.

6
00:00:18,840 --> 00:00:24,000
Companies inside of the brackets I use specify that index divided by 12.

7
00:00:24,000 --> 00:00:24,610
OK.

8
00:00:24,960 --> 00:00:32,130
So first of all let me tell you that this array is going to be executed until the value of this index

9
00:00:32,130 --> 00:00:39,010
variable here as you can see is less than the value of the line of this company and devices Adli.

10
00:00:39,080 --> 00:00:39,850
OK.

11
00:00:40,140 --> 00:00:45,560
So as you can see here the land of this company and devices array is Sixthly.

12
00:00:45,660 --> 00:00:46,340
OK.

13
00:00:46,620 --> 00:00:54,330
So as you can see here in line 24 where we actually instantiated this array we specified that the size

14
00:00:54,360 --> 00:00:59,360
of this rate is 60 so that the value is the length of this Aure.

15
00:00:59,460 --> 00:01:00,290
OK.

16
00:01:00,600 --> 00:01:07,290
So now for example for the first time that this loop is going to be executed the value of the index

17
00:01:07,290 --> 00:01:08,180
variable is zero.

18
00:01:08,180 --> 00:01:08,770
Okay.

19
00:01:09,000 --> 00:01:12,920
So here we wrote that company and devices sub index.

20
00:01:12,930 --> 00:01:14,630
So the value of the index is zero.

21
00:01:14,790 --> 00:01:19,170
And this means go inside of the index zero of this company and the basis.

22
00:01:19,190 --> 00:01:20,340
Ari Okay.

23
00:01:20,790 --> 00:01:24,340
And now you want to assign a value to that index of that arii.

24
00:01:24,420 --> 00:01:25,010
OK.

25
00:01:25,260 --> 00:01:33,120
So here we just putting the new keyboard here because we want to create some objects of type company

26
00:01:33,120 --> 00:01:37,910
and device class and then we want to assign those objects to this area.

27
00:01:37,920 --> 00:01:38,310
OK.

28
00:01:38,400 --> 00:01:44,390
For example we want to create an object and then we want to assign that object to the index 0.

29
00:01:44,610 --> 00:01:46,110
As you can see here to this area.

30
00:01:46,140 --> 00:01:47,000
OK.

31
00:01:47,400 --> 00:01:54,080
And here in say the practices of this company and devise a class we need to actually specify two arguments.

32
00:01:54,090 --> 00:01:58,690
Ok for the constructor of this class because we are creating an object from this class OK.

33
00:01:58,860 --> 00:02:05,730
So the first argument that we should provide for this constructor is that we need to actually specify

34
00:02:05,730 --> 00:02:06,990
the name of the company.

35
00:02:07,030 --> 00:02:14,250
OK so first of all I referred to the name of these companies here as you can see if we create we created

36
00:02:14,250 --> 00:02:19,910
an array of strings here in line 20 and we assign somebody used to this.

37
00:02:19,970 --> 00:02:20,530
OK.

38
00:02:20,600 --> 00:02:22,890
One two three four five.

39
00:02:22,930 --> 00:02:28,380
We assigned five string values to these at a and b refers to that area.

40
00:02:28,400 --> 00:02:28,840
OK.

41
00:02:28,890 --> 00:02:33,900
And inside the brackets of this Auret I specify that index divided by 12.

42
00:02:33,900 --> 00:02:39,370
OK so the first then that this area is going to be executed the value of this index variable is 0 OK

43
00:02:39,600 --> 00:02:42,150
so zero divided by 12.

44
00:02:42,150 --> 00:02:48,390
So now that we actually opened the calculator app and then I'll show you the calculations that are actually

45
00:02:48,390 --> 00:02:49,890
being performed in this application.

46
00:02:49,890 --> 00:02:50,390
OK.

47
00:02:50,430 --> 00:02:53,500
So as you can see here this is our calculator OK.

48
00:02:53,730 --> 00:02:59,130
So for the first time that this loop is going to be executed the value of this index variable is zero.

49
00:02:59,250 --> 00:02:59,860
OK.

50
00:03:00,030 --> 00:03:06,700
And here inside the brackets of these companies are I to actually divide the value of this index variable.

51
00:03:06,730 --> 00:03:08,040
It is right the number 12.

52
00:03:08,040 --> 00:03:08,510
OK.

53
00:03:08,760 --> 00:03:15,500
So number is 0 divided by number 12 is equal to number 0.

54
00:03:15,500 --> 00:03:15,950
OK.

55
00:03:16,080 --> 00:03:20,460
And then it's going to go inside of the company's array and then it's going to actually go inside of

56
00:03:20,460 --> 00:03:22,110
the index number 0.

57
00:03:22,170 --> 00:03:24,880
OK so as you can see this is the index number 0.

58
00:03:24,880 --> 00:03:25,140
OK.

59
00:03:25,140 --> 00:03:29,630
So remember in proclaiming We always count from number zero.

60
00:03:29,640 --> 00:03:30,680
OK.

61
00:03:31,170 --> 00:03:38,290
So this value of this Apple value is the value that is actually inside of the index zero of these companies.

62
00:03:38,420 --> 00:03:38,970
OK.

63
00:03:39,150 --> 00:03:43,110
So it's going to go inside of these companies are in and then it's going to actually give me this value

64
00:03:43,120 --> 00:03:43,720
apple.

65
00:03:43,920 --> 00:03:44,410
OK.

66
00:03:44,490 --> 00:03:50,460
So this is the first arguments that we actually provided for this company and device constructor.

67
00:03:50,610 --> 00:03:56,310
And the second argument that we should actually provide for this company and the base constructor is

68
00:03:56,520 --> 00:03:58,630
that we need to specify the company device.

69
00:03:58,650 --> 00:03:59,370
Okay.

70
00:03:59,370 --> 00:04:01,280
So this is the company named Apple.

71
00:04:01,770 --> 00:04:04,530
And now I need to actually specify the company device.

72
00:04:04,530 --> 00:04:05,660
So these are the devices.

73
00:04:05,670 --> 00:04:06,270
Okay.

74
00:04:06,570 --> 00:04:13,500
So here I could just refer to the name of these devices are a devices.

75
00:04:13,700 --> 00:04:20,360
And then I could just put in a pair of brackets and this time I want to just type in index.

76
00:04:20,830 --> 00:04:21,360
OK.

77
00:04:21,540 --> 00:04:25,200
Module number 12.

78
00:04:25,610 --> 00:04:30,580
And then I need to actually put in a semicolon at the end of my statement this time I actually referred

79
00:04:30,590 --> 00:04:32,640
to the name of these devices.

80
00:04:32,720 --> 00:04:35,540
Because I want to actually specify the company device.

81
00:04:35,540 --> 00:04:36,170
OK.

82
00:04:36,470 --> 00:04:41,630
And then inside the brackets of these devices array I did a relatively something different.

83
00:04:41,780 --> 00:04:47,740
I actually referred to the name of this index variable module number 12.

84
00:04:47,780 --> 00:04:48,270
OK.

85
00:04:48,410 --> 00:04:55,030
So for the first time that this loop is going to be executed the value of this index variable is zero

86
00:04:55,040 --> 00:04:55,500
OK.

87
00:04:55,670 --> 00:04:59,520
So numbers 0 module number 12.

88
00:04:59,580 --> 00:05:00,050
OK.

89
00:05:00,140 --> 00:05:01,910
Is equal to number 0 OK.

90
00:05:02,030 --> 00:05:03,990
And then it's going to give me the value 0.

91
00:05:04,010 --> 00:05:04,430
OK.

92
00:05:04,520 --> 00:05:08,540
And then it's going to go inside of the index zero of these devices are a.

93
00:05:08,690 --> 00:05:14,800
So the value of this of the index is zero of these devices is experience as it's free.

94
00:05:14,800 --> 00:05:15,270
OK.

95
00:05:15,380 --> 00:05:20,630
And then it's going to return that value to me experience it free and then it's going to actually assign

96
00:05:20,660 --> 00:05:25,530
those values to the index zero of this company and devices at a.

97
00:05:25,680 --> 00:05:26,160
OK.

98
00:05:26,180 --> 00:05:31,910
And then it's going to actually execute this loop until the value of this index variable is actually

99
00:05:31,910 --> 00:05:33,880
less than 60 OK.

100
00:05:33,920 --> 00:05:37,300
Companies and devices that lend is 60.

101
00:05:37,310 --> 00:05:43,330
So for example for the second time that this group is going to be executed the value of the index variable

102
00:05:43,340 --> 00:05:44,120
is number one.

103
00:05:44,120 --> 00:05:44,360
OK.

104
00:05:44,360 --> 00:05:50,420
Because we just specified here that after each execution of this for loop increment the value of this

105
00:05:50,420 --> 00:05:52,270
index valuable by 1.

106
00:05:52,280 --> 00:05:55,600
So now the value of this index variable is number one.

107
00:05:55,610 --> 00:05:56,350
Okay.

108
00:05:56,720 --> 00:06:00,650
And then it's going to actually go inside of this for loop and then it's going to actually execute this

109
00:06:00,650 --> 00:06:02,140
piece of code here.

110
00:06:02,150 --> 00:06:06,300
So first of all we really failed to the name of this Arrey company and devices.

111
00:06:06,320 --> 00:06:07,010
Okay.

112
00:06:07,340 --> 00:06:11,600
And inside the brackets we specify the index of this Aure index.

113
00:06:11,630 --> 00:06:15,680
So now that the value of this index variable is number one.

114
00:06:15,740 --> 00:06:22,330
Now we want to actually assign a value to that specific index to the index number of one of these arii.

115
00:06:22,400 --> 00:06:22,930
OK.

116
00:06:23,030 --> 00:06:30,300
So here I want to actually create an object a new company and device and then first of all for the first

117
00:06:30,620 --> 00:06:35,620
argument of the constructor of this class I need to specify the company name.

118
00:06:35,750 --> 00:06:39,820
So first of all I referred to the name of these companies.

119
00:06:40,380 --> 00:06:40,660
OK.

120
00:06:40,670 --> 00:06:42,860
As you can see here index.

121
00:06:42,860 --> 00:06:48,190
So now as you can see inside the brackets I just referred to the name of this index variable.

122
00:06:48,260 --> 00:06:52,460
So the value of this index variable now is number one.

123
00:06:52,490 --> 00:06:53,140
OK.

124
00:06:53,420 --> 00:06:54,860
Divided by 12.

125
00:06:54,860 --> 00:07:00,260
So number one divided by 12 is number one divided by 12 is number 0.

126
00:07:00,260 --> 00:07:05,750
OK so remember because we are actually divided into two integer numbers it's going to only give us the

127
00:07:05,750 --> 00:07:06,850
value 0 0.

128
00:07:07,010 --> 00:07:09,850
It's going to actually keep this a decimal digits.

129
00:07:09,920 --> 00:07:15,350
And then it's going to only give us the values the 0 because we are actually divided in number an integer

130
00:07:15,350 --> 00:07:17,810
number by another integer number.

131
00:07:17,810 --> 00:07:18,250
OK.

132
00:07:18,290 --> 00:07:21,500
Index divided by 12 is 0.

133
00:07:21,560 --> 00:07:27,090
OK so then it's going to actually go inside of the index zero of these companies Auret.

134
00:07:27,110 --> 00:07:30,900
So the value that is inside of the index zero of these companies right is uphill.

135
00:07:31,010 --> 00:07:32,620
As you can see this value.

136
00:07:33,050 --> 00:07:39,980
And then again here we are actually specifying the company device here for the second argument and then

137
00:07:39,980 --> 00:07:46,200
we go inside of the devices Aure as you can see this is the devices array and then the value of this

138
00:07:46,220 --> 00:07:48,440
index value by now is number one.

139
00:07:48,440 --> 00:07:50,560
So number one module number 12.

140
00:07:50,660 --> 00:07:53,420
So number one module number 12.

141
00:07:54,040 --> 00:07:54,600
Okay.

142
00:07:54,860 --> 00:07:58,820
As you can see number one module number 12 is number 1.

143
00:07:59,150 --> 00:07:59,740
Okay.

144
00:07:59,930 --> 00:08:04,550
And then it's going to go inside of these devices great and then it's going I try to go inside of the

145
00:08:04,550 --> 00:08:07,180
index number of one of these arii.

146
00:08:07,220 --> 00:08:11,930
So the value that is inside of the index number of one of these devices Aure is iPhone 6.

147
00:08:11,930 --> 00:08:12,640
OK.

148
00:08:13,010 --> 00:08:16,320
So then it's going to actually give me this iPhone 6 to me.

149
00:08:16,370 --> 00:08:21,500
And then as you can see it is values the company name and and the company device is going to be assigned

150
00:08:21,680 --> 00:08:25,450
to the index number one of this company and devices arey.

151
00:08:25,490 --> 00:08:26,050
OK.

152
00:08:26,210 --> 00:08:32,240
And for the first time that this is going to be executed again the value of this index value is going

153
00:08:32,240 --> 00:08:33,560
to be incremented by Yvonne.

154
00:08:33,620 --> 00:08:36,410
And now the value of that is inside of the index.

155
00:08:36,440 --> 00:08:39,150
Valuable is actually the number two.

156
00:08:39,280 --> 00:08:41,640
Here instead of the for loop as you can see.

157
00:08:41,690 --> 00:08:44,660
And then it's going to actually check this condition here.

158
00:08:44,660 --> 00:08:47,170
Number two is less than company and devices that lead.

159
00:08:47,270 --> 00:08:51,710
So it is Trudy's condition evaluates to true and then it's going to go inside of this for loop.

160
00:08:51,740 --> 00:08:56,960
And then again it's again it can actually execute this piece of code that is inside of this for a loop.

161
00:08:56,960 --> 00:08:57,760
OK.

162
00:08:57,800 --> 00:09:01,280
So first of all I referred to the name of this company and devices.

163
00:09:01,610 --> 00:09:03,350
OK bracket's index.

164
00:09:03,350 --> 00:09:07,820
So here are now the value of this index value is number two.

165
00:09:07,970 --> 00:09:11,090
So it's going to go inside of the index number two of this array.

166
00:09:11,140 --> 00:09:11,970
OK assignments.

167
00:09:12,050 --> 00:09:16,850
Operator now you want to actually instead assign a value to the index number.

168
00:09:16,860 --> 00:09:18,470
Two of these are.

169
00:09:18,510 --> 00:09:19,380
OK.

170
00:09:19,690 --> 00:09:25,900
A new Ok companion device and now we want to actually create an object from this company and device

171
00:09:25,900 --> 00:09:30,980
class and I want to assign that object to this array through the index number two of that of this address.

172
00:09:31,000 --> 00:09:31,500
OK.

173
00:09:31,510 --> 00:09:36,190
Because we want to actually create an object from this company and device at the constructor of this

174
00:09:36,190 --> 00:09:37,420
class is going to be called.

175
00:09:37,420 --> 00:09:42,910
So if you need to actually specify to actually two values the arguments of this array.

176
00:09:43,000 --> 00:09:47,910
OK we need to actually specify two arguments for this company and device constructor.

177
00:09:47,920 --> 00:09:50,890
And for the first argument we need to specify the company name.

178
00:09:50,890 --> 00:09:51,510
OK.

179
00:09:51,520 --> 00:09:54,630
So as you can see I referred to the name of these companies arii.

180
00:09:54,700 --> 00:09:55,270
OK.

181
00:09:55,600 --> 00:09:56,860
And in brackets.

182
00:09:56,890 --> 00:09:59,050
I just put in brackets here.

183
00:09:59,050 --> 00:10:00,850
Index divided by 12.

184
00:10:00,850 --> 00:10:10,470
Now that the value of this index variable is number 2 so 2 divided by 12 is again number 0.

185
00:10:10,570 --> 00:10:11,060
OK.

186
00:10:11,230 --> 00:10:17,220
So as you can see here because we are actually dividing two integer values together it can actually

187
00:10:17,230 --> 00:10:23,610
only give us an integer number and it can actually skip the the decimal digits.

188
00:10:23,680 --> 00:10:27,910
It's going to only give us an integer numbers divided by 12 is number 0.

189
00:10:27,910 --> 00:10:28,380
OK.

