1
00:00:00,130 --> 00:00:00,850
I every man.

2
00:00:00,870 --> 00:00:06,300
So in this story I'm going to go ahead and I'm going to go inside this class country datasource class

3
00:00:06,840 --> 00:00:11,850
and inside this file and inside the curly braces of this class I'm going to create a new method called

4
00:00:12,270 --> 00:00:16,690
match with minimum level confidence of use or words.

5
00:00:16,890 --> 00:00:18,110
So let's create that.

6
00:00:18,130 --> 00:00:20,330
Here it is going to be a public method.

7
00:00:20,610 --> 00:00:27,580
And if you're going to specify the return type of the Smif it here which is going to be streamed by

8
00:00:27,610 --> 00:00:40,600
you and the name of the Smurfette is going to be match with minimum minimum confidence level of user.

9
00:00:40,690 --> 00:00:42,130
User words.

10
00:00:42,220 --> 00:00:42,640
Right.

11
00:00:42,640 --> 00:00:47,350
Let's put our performances here because we are going to actually specify that this method is going to

12
00:00:47,530 --> 00:00:48,840
accept some arguments.

13
00:00:48,970 --> 00:00:53,880
So let's specify those parameters here inside the practices of this method here.

14
00:00:53,890 --> 00:00:57,340
So the first argument is going to be released.

15
00:00:57,520 --> 00:01:02,830
OK let's put a pair of angle brackets here and inside the angle brackets we need to specify that data

16
00:01:02,830 --> 00:01:07,070
type of the objects that we are going to have inside this list.

17
00:01:07,090 --> 00:01:09,150
So it is going to be strange.

18
00:01:09,280 --> 00:01:09,950
Right.

19
00:01:10,330 --> 00:01:15,910
So let's actually put our space here and I'm going to specify the name of this allele which is going

20
00:01:15,910 --> 00:01:17,990
to be used for words.

21
00:01:18,010 --> 00:01:21,300
Come on now let's specify the second argument.

22
00:01:21,310 --> 00:01:22,800
The second parameter actually.

23
00:01:22,930 --> 00:01:28,810
So now let's actually specify the second trimester of the Smurfette here which is going to be an array

24
00:01:29,050 --> 00:01:30,400
of floats values.

25
00:01:30,400 --> 00:01:35,170
So just type in here float and and then put a pair of brackets in order to specify that it is going

26
00:01:35,170 --> 00:01:37,170
to be an array of floats values.

27
00:01:37,320 --> 00:01:43,560
And then here the name is going to be confidence confidence levels.

28
00:01:43,570 --> 00:01:44,040
Right.

29
00:01:44,260 --> 00:01:47,080
So let's open and close this method by using these curly braces.

30
00:01:47,080 --> 00:01:49,930
Let me create a new line here so that you can see what's going on.

31
00:01:49,950 --> 00:01:50,270
Yes.

32
00:01:50,390 --> 00:01:54,630
These are my faith here inside this class country data source class public street.

33
00:01:54,640 --> 00:01:59,590
This is the return type of this method the name of this method is much a match with minimum confidence

34
00:01:59,590 --> 00:02:01,270
level of use or words.

35
00:02:01,300 --> 00:02:03,700
This method has two prime hitters here.

36
00:02:03,700 --> 00:02:10,140
The first one is the use of words which is of type aerialist here strange and we have this a float values.

37
00:02:10,350 --> 00:02:11,700
Your confidence levels.

38
00:02:11,710 --> 00:02:14,010
So these are the two prime tools of this method.

39
00:02:14,020 --> 00:02:19,420
So now it's time to go inside the Smurfette and we are going to actually put our own logic here inside

40
00:02:19,420 --> 00:02:21,140
the curly braces of this method.

41
00:02:21,160 --> 00:02:26,110
So first of all we're are going to check that whether these two arguments that are going to be passed

42
00:02:26,350 --> 00:02:29,540
here to the Smurfette are actually null or not.

43
00:02:29,560 --> 00:02:31,320
So let's create an if statement.

44
00:02:31,430 --> 00:02:35,990
If user votes as you can see I am referring to this parameter name right.

45
00:02:36,040 --> 00:02:38,990
Is equal to null or.

46
00:02:39,460 --> 00:02:43,930
And then here I'm going to refer to this confidence levels argument here.

47
00:02:43,930 --> 00:02:53,890
So confidence levels is equal to null then in that case are going to return a string value from this

48
00:02:54,040 --> 00:02:55,210
actually nymphet.

49
00:02:55,240 --> 00:03:02,500
So you are going to return the default country OK because if the user course is actually not all the

50
00:03:02,500 --> 00:03:09,470
confidence level is actually null This means that we have not access to and to a specific Vort.

51
00:03:09,610 --> 00:03:10,150
Right.

52
00:03:10,180 --> 00:03:15,040
So in that case you're are going to show that Canada on the map to the user.

53
00:03:15,070 --> 00:03:16,060
So let's return.

54
00:03:16,060 --> 00:03:22,180
Default actually the default country name semi-colon.

55
00:03:22,200 --> 00:03:27,570
So let me show you the instance variables that we created here you can see that we created some constants

56
00:03:27,570 --> 00:03:28,320
here.

57
00:03:28,380 --> 00:03:29,970
The first one is the country key.

58
00:03:30,150 --> 00:03:32,010
We have the minimum confidence level.

59
00:03:32,130 --> 00:03:38,770
We have the default country name Canada default country latitude longitude and the default message.

60
00:03:38,820 --> 00:03:39,840
So let's scroll down here.

61
00:03:39,840 --> 00:03:46,290
So after this if statement here inside the Smurfette I'm going to put some more color codes here.

62
00:03:46,290 --> 00:03:52,320
So let's create an integer variable here int number of user words.

63
00:03:52,320 --> 00:03:53,670
Number of use of words.

64
00:03:53,670 --> 00:03:54,720
Assignment operator.

65
00:03:54,730 --> 00:04:01,410
So I'm going to refer to this Aurelie still use the words dot and then I can actually call this method

66
00:04:01,440 --> 00:04:04,010
and this Aurelia's size semicolon.

67
00:04:04,020 --> 00:04:09,930
So in this case it can actually return the number of elements that we have inside this list and it's

68
00:04:09,930 --> 00:04:13,650
going to assign those elements actually the size of those elements.

69
00:04:13,830 --> 00:04:17,520
The number of those elements to this valuable number of user words.

70
00:04:17,520 --> 00:04:21,900
So now let's actually create some space here.

71
00:04:22,080 --> 00:04:24,900
I want to talk about the enumeration interface.

72
00:04:24,900 --> 00:04:27,500
First let me show you the documentation here.

73
00:04:27,750 --> 00:04:31,550
So let's open the Android actually documentation on your web browser.

74
00:04:31,590 --> 00:04:37,980
So now you can see that I actually searched for the enumeration interface and this interface is inside

75
00:04:37,980 --> 00:04:39,880
a job that U-T package.

76
00:04:40,170 --> 00:04:42,230
So here you can see this link here.

77
00:04:42,300 --> 00:04:43,390
Let's click on it.

78
00:04:43,410 --> 00:04:49,010
So now it says that the enumeration is actually an interface a public interface.

79
00:04:49,410 --> 00:04:55,770
And let's look at it this description he had an object that implements the enumeration interface generates

80
00:04:56,190 --> 00:04:59,300
a series of elements one at a time.

81
00:04:59,570 --> 00:05:00,090
OK.

82
00:05:00,330 --> 00:05:04,530
So it is very important a series of elements one at a time.

83
00:05:04,650 --> 00:05:10,040
Successive calls to the next element before the return the successive elements of the series.

84
00:05:10,050 --> 00:05:15,590
So here you can take a look at an example here and let's look at the other descriptions here.

85
00:05:15,600 --> 00:05:21,070
It says methods are provided to enumerate for the elements of a vector.

86
00:05:21,090 --> 00:05:25,020
The key is of a hash table and the values in a hash table.

87
00:05:25,350 --> 00:05:32,520
Enumerations are also used to specify the input streams to a sequence input stream.

88
00:05:32,520 --> 00:05:38,570
Note the functionality of this interface is duplicated by the rated iterator interface.

89
00:05:38,580 --> 00:05:45,660
In addition iterator adds an optional remove operation and has short term effect names.

90
00:05:45,960 --> 00:05:52,350
New implementations should consider using iterator in preference to enumeration.

91
00:05:52,800 --> 00:05:55,310
So let's actually look at the summary here.

92
00:05:55,320 --> 00:05:58,680
It says we have this method has more elements tests.

93
00:05:58,770 --> 00:06:06,040
If this enumeration contains more elements next element returns the next element of this enumeration.

94
00:06:06,060 --> 00:06:10,320
If this enumeration object has at least one more element to provide.

95
00:06:10,470 --> 00:06:14,100
So let's go back to android studio here.

96
00:06:14,220 --> 00:06:19,380
So here it is RMF at match with minimum confident confidence level of use of words here inside this

97
00:06:19,380 --> 00:06:21,370
country data source class.

98
00:06:21,400 --> 00:06:22,350
So instead method.

99
00:06:22,380 --> 00:06:27,600
After this line of put here in line number 43 here you are actually getting the number of elements that

100
00:06:27,600 --> 00:06:28,460
we have inside.

101
00:06:28,490 --> 00:06:29,440
Is this right.

102
00:06:29,670 --> 00:06:32,060
Let's create an enumeration here.

103
00:06:32,280 --> 00:06:39,640
So here we can say enumeration OK let's put a pair of angle brackets inside the angle brackets.

104
00:06:39,640 --> 00:06:44,900
When it is specified the data type of the values that you're going to have inside this information.

105
00:06:44,980 --> 00:06:52,990
So it is going to be strange and the name of this enumeration is going to be countries here let's create

106
00:06:53,050 --> 00:06:59,220
a for loop and first of all we need to specify the initial value which is going to be of that integer

107
00:06:59,280 --> 00:07:05,810
and the name is index set and then let's initially assign the value 0 to the value of a semicolon.

108
00:07:06,060 --> 00:07:11,730
So here we need to actually specify the condition that determines how many times this fall is going

109
00:07:11,730 --> 00:07:12,890
to be executed.

110
00:07:13,230 --> 00:07:16,840
So here we are going to actually use two conditions instead of one.

111
00:07:16,950 --> 00:07:18,420
So let's see how we can do that first.

112
00:07:18,450 --> 00:07:25,140
I'm going to say this for loop it's going to be executed until the value of the index variable is actually

113
00:07:25,140 --> 00:07:28,530
less than the number of user words.

114
00:07:28,530 --> 00:07:29,850
So let's step in here.

115
00:07:29,840 --> 00:07:38,910
Number of user reports and I am actually using these and the logical operator index is less than the

116
00:07:38,910 --> 00:07:42,320
value of these confidence levels that Len.

117
00:07:42,810 --> 00:07:47,240
Actually we are good at accessing the length of this Arey which is off the floor.

118
00:07:47,340 --> 00:07:54,900
So here I can refer to these arguments name confidence levels that lead and index is less than that.

119
00:07:55,080 --> 00:07:59,380
Actually the length of this at a confidence level is here semicolon.

120
00:07:59,430 --> 00:08:04,070
And finally we need to say index plus plus.

121
00:08:04,090 --> 00:08:07,190
So let's open and close this followed by using these curly braces.

122
00:08:07,480 --> 00:08:10,590
Let me create a new line here so that you can see what's going on.

123
00:08:10,630 --> 00:08:11,620
Yes exactly.

124
00:08:11,620 --> 00:08:16,150
So let's go inside this for loop here and let's see what you are going to do next.

125
00:08:16,150 --> 00:08:23,440
So here we are going to say if let's actually refer to these confidence levels at a if confidence levels

126
00:08:24,660 --> 00:08:26,710
practice index.

127
00:08:26,820 --> 00:08:30,320
So here we are going to access this specific element.

128
00:08:30,400 --> 00:08:35,520
All these specific confidence level that we have inside this specific index.

129
00:08:35,520 --> 00:08:40,170
So for example for the first time that is full of here it's going to be executed the index value is

130
00:08:40,170 --> 00:08:40,820
zero.

131
00:08:41,100 --> 00:08:45,720
So it's going to go inside this at a confidence level and it's going to access the value that we have

132
00:08:45,720 --> 00:08:47,730
inside the index zero.

133
00:08:47,760 --> 00:08:56,100
And here you are saying that if confidence levels index zero is less than actually mean and minimum

134
00:08:56,100 --> 00:08:58,350
confidence level here.

135
00:08:58,830 --> 00:09:05,280
So we created a variable and actually a constant here inside our class country datasource here in line

136
00:09:05,280 --> 00:09:06,400
number 16.

137
00:09:06,510 --> 00:09:07,290
Right.

138
00:09:07,320 --> 00:09:13,530
So you can see this line of code and here you specify that the minimum confidence level here is zero

139
00:09:13,530 --> 00:09:15,230
point four here.

140
00:09:15,270 --> 00:09:17,640
So it is actually a float value.

141
00:09:17,920 --> 00:09:22,350
And this is going to go in to specify the minimum confidence level.

142
00:09:22,530 --> 00:09:28,900
And this means that values below the confidence level are not actually accepted.

143
00:09:29,100 --> 00:09:36,030
OK we're going to break out of our Meffert if the specific value is actually below the minimum confidence

144
00:09:36,030 --> 00:09:36,380
level.

145
00:09:36,510 --> 00:09:43,560
So the minimum confidence level must be actually equal to this value or greater than this value not

146
00:09:43,560 --> 00:09:44,630
below the value.

147
00:09:44,640 --> 00:09:45,180
Right.

148
00:09:45,180 --> 00:09:50,010
So here you can see that I actually mistakenly created a pretty good point here.

149
00:09:50,100 --> 00:09:53,020
So in order to deal with this point I just need to click on it.

150
00:09:53,210 --> 00:09:53,710
OK.

151
00:09:53,730 --> 00:09:56,220
In order to create it again I just need to click on the site.

152
00:09:56,460 --> 00:09:59,320
And in order to do it I just need to click on it again.

153
00:09:59,430 --> 00:10:01,460
So let's scroll down here.

154
00:10:01,770 --> 00:10:07,230
So if you're I mean set is meant for the writing so it is match with minimum confidence levels a level

155
00:10:07,230 --> 00:10:08,270
of use that it words.

156
00:10:08,640 --> 00:10:14,370
And here I am saying if confidence level index is less than minimum confidence level so it is not accepted.

157
00:10:14,430 --> 00:10:16,300
Here we are going to say.

158
00:10:16,710 --> 00:10:18,770
So it's going to break out of the sniff at here.

159
00:10:18,780 --> 00:10:20,940
This effort that we actually created here.

160
00:10:21,540 --> 00:10:24,710
So after this if statement here I can't say.

161
00:10:24,840 --> 00:10:27,640
So let's create a variable of type string here.

162
00:10:27,660 --> 00:10:31,870
So just typing here is strange string and the name of this variable is very important.

163
00:10:31,890 --> 00:10:36,870
Just taken he had accepted user vord.

164
00:10:37,040 --> 00:10:40,630
You can see that I am actually choosing a name meaningful here right.

165
00:10:40,730 --> 00:10:43,550
Accepted user or assignment operator.

166
00:10:43,550 --> 00:10:48,610
So here I can refer to this at a list here that we have as an argument.

167
00:10:48,680 --> 00:10:57,920
So here I can't say user votes that get and here I just need to pass the index semicolon.

168
00:10:57,920 --> 00:11:04,420
So in this way we are actually accessing the accepted user word according to that minimum confidence

169
00:11:04,420 --> 00:11:06,680
here that is specified here right.

170
00:11:07,370 --> 00:11:13,790
So according to this minimum confidence level it is going to actually get the accepted user award here.

171
00:11:14,150 --> 00:11:19,610
According to this index right a specific word that is really related to this index and it's going to

172
00:11:19,750 --> 00:11:23,480
slide this forward to this very well accepted use that word.

173
00:11:23,510 --> 00:11:29,510
So after this line of quote here I'm going to actually initialize this valuable this local variable

174
00:11:29,510 --> 00:11:35,240
that we actually declared in line number 47 here inside the Smurfette.

175
00:11:35,240 --> 00:11:39,840
So I can actually say countries assignment operator.

176
00:11:40,000 --> 00:11:41,500
So let me scroll to the top here.

177
00:11:41,500 --> 00:11:45,040
Here you can see that he created a variable of type hash table.

178
00:11:45,220 --> 00:11:49,590
So I told you hash table consists of keys and values.

179
00:11:49,690 --> 00:11:56,430
So we have keys and values and this means that a specific value is related to that specific key.

180
00:11:56,440 --> 00:12:02,380
So here inside the angle brackets the first string here is actually related to the data type of the

181
00:12:02,380 --> 00:12:05,400
keys that we are going to have inside this hash table.

182
00:12:05,500 --> 00:12:11,020
And the second string here is related to the data type of the values that we are going to have inside

183
00:12:11,020 --> 00:12:11,960
this hash table.

184
00:12:11,980 --> 00:12:14,470
So the name is countries and messages.

185
00:12:14,470 --> 00:12:17,010
So you can see that its name is really meaningful.

186
00:12:17,080 --> 00:12:22,760
Countries refer to the actually the key and messages referred to the value.

187
00:12:22,780 --> 00:12:25,090
So let's scroll down here.

188
00:12:25,500 --> 00:12:29,450
And inside this here I'm going to initialize this country's information here right.

189
00:12:29,560 --> 00:12:35,560
So I can refer to that hash table here countries and messages that cheese.

190
00:12:35,640 --> 00:12:40,810
So I'm going to access the keys of this hash table variable.

191
00:12:41,260 --> 00:12:43,170
So the keys are countries right.

192
00:12:43,210 --> 00:12:50,030
So that's why I am assigning the keys to this variable and you can see that its name is countries information.

193
00:12:50,050 --> 00:12:51,870
So after this line of code here.

194
00:12:51,970 --> 00:12:56,610
So here let's create a loop so void.

195
00:12:56,620 --> 00:13:05,690
And here I'm going to refer to this integration here countries that has more elements has more elements

196
00:13:05,810 --> 00:13:12,860
here I am saying that if this country's information has more elements we are actually saying that if

197
00:13:12,860 --> 00:13:19,190
this country's in question actually does have for example some elements inside it OK if it is whether

198
00:13:19,370 --> 00:13:26,000
it is empty or not if it is not empty and it is and it has more elements then we are actually going

199
00:13:26,000 --> 00:13:30,190
to open and close this window by using these curly braces here too.

200
00:13:30,220 --> 00:13:32,700
Now let me show you the documentation.

201
00:13:33,050 --> 00:13:37,370
So here you can see that the summary here and it says has elements Mefford.

202
00:13:37,760 --> 00:13:42,810
And it says tests if this enumeration contains more elements.

203
00:13:42,890 --> 00:13:49,480
So let's go back to Andrew in Studio inside the curly braces of this y loop so here can create another

204
00:13:49,480 --> 00:13:51,520
value of types 3 in here.

205
00:13:51,800 --> 00:13:53,540
And the name is going to be selected.

206
00:13:53,540 --> 00:13:59,600
Country assignment operator and here I can refer to this enumeration countries.

207
00:13:59,750 --> 00:14:05,650
That next element semicolon Let me show you the Android documentation.

208
00:14:05,690 --> 00:14:11,240
So take a look at this map with your next element returns the next element of this information.

209
00:14:11,270 --> 00:14:16,270
If this enumeration object has at least one more element to prove what.

210
00:14:16,370 --> 00:14:21,980
So it's going to actually give us the next element to the specific elements that is available and it's

211
00:14:21,980 --> 00:14:28,070
going to assign it to this variable selected country and now it's time to create another if statement

212
00:14:28,070 --> 00:14:29,010
inside this way.

213
00:14:29,090 --> 00:14:35,730
So if and here I can actually refer to this user word valuable that we created here.

214
00:14:35,980 --> 00:14:38,310
Let me show you this right here and here.

215
00:14:38,480 --> 00:14:40,020
Accepted use of word.

216
00:14:40,160 --> 00:14:40,700
Right.

217
00:14:40,700 --> 00:14:48,500
So if accepted use that word that equals ignore chase.

218
00:14:48,630 --> 00:14:49,460
So what is this.

219
00:14:49,490 --> 00:14:55,470
If it means this me if it means that if this accepted use or what string value is actually equal to

220
00:14:55,530 --> 00:14:58,290
another a string value that are going to pass that is MF'er.

221
00:14:58,290 --> 00:15:01,470
So what does this case mean here means.

222
00:15:01,470 --> 00:15:11,320
This means that the leaders of this accepted use or word here are actually according to the case.

223
00:15:11,340 --> 00:15:16,540
For example if it is capitalized or it is lowercase it's going to ignore it.

224
00:15:16,560 --> 00:15:24,470
OK if it is capitalized it's going to ignore the capitalisation actually aspect of this word.

225
00:15:24,750 --> 00:15:31,130
So it's going to ignore the case and it's going to actually it doesn't matter whether it is lowercase

226
00:15:31,160 --> 00:15:38,270
or capitalized it can actually just compare whether these this accepted use or word is equal to the

227
00:15:38,270 --> 00:15:39,870
selected country.

228
00:15:40,220 --> 00:15:45,490
OK then in that case it's going to actually open it it's open and close this if statement here by using

229
00:15:45,490 --> 00:15:46,530
these curly braces.

230
00:15:46,720 --> 00:15:49,980
So now let me show you this method in the Android mentation.

231
00:15:49,990 --> 00:15:57,430
So here just into this you are a developer and writer slash referenced slash Java slash land slash string

232
00:15:57,430 --> 00:15:58,640
that HDMI out.

233
00:15:58,930 --> 00:16:02,080
So here I searched for the Smurfit equals ignore case.

234
00:16:02,080 --> 00:16:08,630
So you can see this buffer here and it says compares this strange to and other streams ignored into

235
00:16:08,680 --> 00:16:10,590
case considerations.

236
00:16:10,870 --> 00:16:11,750
This is very important.

237
00:16:11,830 --> 00:16:13,800
Ignoring case considerations.

238
00:16:13,900 --> 00:16:18,060
So let's go back to our studio at this if statement here.

239
00:16:18,250 --> 00:16:24,760
We are actually a hundred and fifty percent sure that the accepted user vote is actually equal to the

240
00:16:24,760 --> 00:16:26,380
selected country.

241
00:16:26,380 --> 00:16:26,810
Right.

242
00:16:26,860 --> 00:16:34,370
So now we can actually return accepted user award from the Smurfit accepted user worth semicolon.

243
00:16:34,540 --> 00:16:38,590
So now finally here you can see let me show you the effort here.

244
00:16:38,770 --> 00:16:41,020
The return type of this method is strange.

245
00:16:41,110 --> 00:16:41,590
Right.

246
00:16:41,720 --> 00:16:47,260
We're going to return this specific string value that is actually matched with minimum confidence level

247
00:16:47,440 --> 00:16:49,090
of the user rewards.

248
00:16:49,090 --> 00:16:52,150
So here we are going to return the accepted user vote.

249
00:16:52,180 --> 00:16:56,750
But what happens if for example these these conditions fail.

250
00:16:56,770 --> 00:17:00,830
What happens if this condition that you specified for this fall of here fail.

251
00:17:01,000 --> 00:17:04,790
And this fall doesn't go into it is not going to be executed anymore.

252
00:17:04,930 --> 00:17:09,210
In that case you're going to return the default country from the Smurfette.

253
00:17:09,460 --> 00:17:14,230
So here if you scroll down here you can see that this is the end in place of the Smurfette.

254
00:17:14,230 --> 00:17:14,640
Right.

255
00:17:14,860 --> 00:17:18,460
And here we have an error and it says missing the return statement.

256
00:17:18,640 --> 00:17:24,300
We must return a value from this method but it doesn't matter what happens.

257
00:17:24,390 --> 00:17:32,350
OK we must return osting value Firby-Smith and the compiler must be sure that our value osting value

258
00:17:32,350 --> 00:17:33,960
is going to be returned from dismissal.

259
00:17:34,000 --> 00:17:38,220
We can actually return now we can say return not for it.

260
00:17:38,240 --> 00:17:42,430
Let me just type in Knol but it's not accepted here right.

261
00:17:42,430 --> 00:17:44,320
If you return not from the Smurfette.

262
00:17:44,420 --> 00:17:49,330
Later when we are actually calling the Smurfette And for example if we want to get osting value from

263
00:17:49,330 --> 00:17:54,460
this method and it's going a little not probably Smurfette in that case we are going to have problems

264
00:17:54,640 --> 00:17:57,220
on our application it may actually crash.

265
00:17:57,280 --> 00:18:02,800
So if you are going to return as a default string value which is going to be the default country name

266
00:18:03,130 --> 00:18:03,980
semicolon.

267
00:18:04,450 --> 00:18:05,830
Right that's it.

268
00:18:05,830 --> 00:18:06,960
This is our method.

269
00:18:06,970 --> 00:18:08,890
This is my foot inside this class.

270
00:18:09,100 --> 00:18:13,360
So now it's time to add another method to this class country data source.

271
00:18:13,450 --> 00:18:19,640
So before the end in curly brace of this class country datasource and Asadi an incredible test of the

272
00:18:19,640 --> 00:18:26,590
Smurfette here let's add another method to just type in here Puplick and then return type of this method

273
00:18:26,590 --> 00:18:29,530
is going to be strange and the name of this method is.

274
00:18:29,560 --> 00:18:31,490
Get the info.

275
00:18:31,510 --> 00:18:35,800
Get the info of the country.

276
00:18:35,920 --> 00:18:38,030
So let's put up at Apprentice's here.

277
00:18:38,200 --> 00:18:43,170
So if you are going to pass actually an argument is my fair lady when we are going to call this method

278
00:18:43,220 --> 00:18:45,290
so let's specify the prime meter here.

279
00:18:45,370 --> 00:18:50,590
So the parameter is going to be of type strange and the name is going to be country.

280
00:18:50,770 --> 00:18:53,940
Let's open and close this method by using these curly braces.

281
00:18:54,010 --> 00:18:55,860
So here I can trn.

282
00:18:56,320 --> 00:19:02,240
So let's refer to our hash table instance variable countries and messages.

283
00:19:02,260 --> 00:19:09,220
So here we want to pass the key and get the value and we all know that the country is the key and the

284
00:19:09,220 --> 00:19:13,520
message or the info from that country is going to be the value.

285
00:19:13,540 --> 00:19:20,290
So here when I say countries and messages that get Let's call this method get.

286
00:19:20,320 --> 00:19:24,960
So here you can see that we need to pass the key which is going to be OFF-SIDE object right.

287
00:19:25,060 --> 00:19:28,890
So we all know that's three and is a subclass of object.

288
00:19:28,960 --> 00:19:35,390
So if I pass the country here as an argument to the Smurfette semicolon So here it is the key right.

289
00:19:35,440 --> 00:19:40,900
So when I pass the key when I get the message or the info from that key that's it that's the actually

290
00:19:40,900 --> 00:19:42,730
function of this method.

291
00:19:42,880 --> 00:19:45,600
So let's actually look at this class here.

292
00:19:45,690 --> 00:19:51,740
Here you can see that we actually created some constants in this class and we haven't used them yet.

293
00:19:51,960 --> 00:19:53,140
You are going to use them later.

294
00:19:53,140 --> 00:19:54,630
Don't worry about this one.

295
00:19:55,210 --> 00:20:00,460
But for now just know that we have these constants and you can see that these constants are actually

296
00:20:00,460 --> 00:20:01,290
static.

297
00:20:01,300 --> 00:20:01,640
Right.

298
00:20:01,720 --> 00:20:07,690
This means that by just referring to the name of this class you can directly access these constants

299
00:20:07,840 --> 00:20:09,430
because they are static.

300
00:20:09,550 --> 00:20:12,420
They are actually class variables so that's it.

301
00:20:12,440 --> 00:20:14,670
And I think that's enough for this tutorial.

302
00:20:14,740 --> 00:20:19,030
If you have any questions about the concepts that I taught you in this lesson please post the discussion

303
00:20:19,030 --> 00:20:22,300
in the course and then I'll do my best to answer all of your questions.

304
00:20:22,450 --> 00:20:25,080
Thank you very much for watching and I'll see you in the next tutorial.

