1
00:00:00,180 --> 00:00:04,260
So as you can see here these are the lines of code that I actually pasted here.

2
00:00:04,410 --> 00:00:11,660
So first what I want to actually instantiate this database handler object that I declared in line 25

3
00:00:11,700 --> 00:00:14,310
as you can see here I declared an object of type.

4
00:00:14,310 --> 00:00:15,560
Why is your handler.

5
00:00:15,750 --> 00:00:18,340
And first of all I want to instantiate that object.

6
00:00:18,420 --> 00:00:21,650
So database handler assignment operator new.

7
00:00:21,900 --> 00:00:25,780
My to light my light handler.

8
00:00:26,130 --> 00:00:28,850
And as an argument we need to pass the context.

9
00:00:29,010 --> 00:00:34,440
So the context is this class main activity that this at 11:52 as you can see here.

10
00:00:34,530 --> 00:00:38,760
I actually want to instantiate this all computerless objects.

11
00:00:38,760 --> 00:00:44,540
So as you can see here I declared this object which is of type list as you can see here.

12
00:00:44,730 --> 00:00:50,850
So remember that list is actually an interface which had not actually created directly an object of

13
00:00:50,850 --> 00:00:51,590
type list.

14
00:00:51,630 --> 00:00:57,550
OK so we need to instantiate this list object by using the Aurelia's class.

15
00:00:57,600 --> 00:00:58,050
OK.

16
00:00:58,200 --> 00:01:05,490
But this list interface has more actually more methods and we can use those methods in order to learn

17
00:01:05,580 --> 00:01:07,260
to write our code better.

18
00:01:07,280 --> 00:01:13,230
Ok so now as you can see I want to actually instantiate is all computers object.

19
00:01:13,290 --> 00:01:19,120
So here as you can see in line 52 insight is uncreate method I referred to the name of this object.

20
00:01:19,140 --> 00:01:19,970
All computers.

21
00:01:19,980 --> 00:01:22,910
Assignment operator database handler.

22
00:01:22,930 --> 00:01:27,600
You refer to the name of this object database handler that gets all computers.

23
00:01:27,600 --> 00:01:32,990
So by referring to the name of this object a database handler I can refer to the name of the Smurfit

24
00:01:33,000 --> 00:01:35,560
that I put inside this is too late handler class.

25
00:01:35,730 --> 00:01:43,020
So let's go inside this my skillet handler class as you can see I have the Smurfit here gets all computers

26
00:01:43,080 --> 00:01:47,430
objects as you can see here getting all computer objects by using this mirror that can actually get

27
00:01:47,820 --> 00:01:51,510
all the computer objects that we have inside our database.

28
00:01:51,540 --> 00:01:52,090
OK.

29
00:01:52,560 --> 00:01:57,130
So here I'll refer to the name of this Meffert and then it can actually initialize this all computerless

30
00:01:57,130 --> 00:01:57,900
the least.

31
00:01:58,070 --> 00:01:58,500
OK.

32
00:01:58,590 --> 00:02:06,900
This Arrey on here as you can see inline 50 free as you can see here computer's name assignment operator

33
00:02:07,290 --> 00:02:08,050
here.

34
00:02:08,190 --> 00:02:09,790
New at list.

35
00:02:09,900 --> 00:02:10,450
So it's going.

36
00:02:10,500 --> 00:02:15,560
So here I am just initializing these computers name on a list object as you can see here.

37
00:02:15,700 --> 00:02:21,420
This is going to be an empty Aure because we haven't actually assigned any values to this area yet.

38
00:02:21,510 --> 00:02:21,960
OK.

39
00:02:22,170 --> 00:02:26,460
So now I'm going to paste in some more lines of code here and then I'm going to explain to you what's

40
00:02:26,460 --> 00:02:27,380
going on here.

41
00:02:27,450 --> 00:02:31,960
So as you can see here these are lines of code that I actually pasted here.

42
00:02:32,070 --> 00:02:36,720
So if all computers that size is greater than zero.

43
00:02:36,970 --> 00:02:37,190
OK.

44
00:02:37,200 --> 00:02:42,200
And this means if the size of this all computers at least is greater than zero.

45
00:02:42,300 --> 00:02:43,020
OK.

46
00:02:43,230 --> 00:02:45,820
Remember that it's all computers is actually an addy.

47
00:02:45,870 --> 00:02:49,150
OK so I can I should get the size the size.

48
00:02:49,150 --> 00:02:53,620
If it is going I should return the number of elements that we have inside our list here.

49
00:02:53,640 --> 00:02:54,230
OK.

50
00:02:54,420 --> 00:03:00,600
So if all computers that size is greater than zero if this means that if we have any objects inside

51
00:03:00,690 --> 00:03:02,660
our school database OK.

52
00:03:02,670 --> 00:03:07,050
If the number of objects inside our database is greater than zero.

53
00:03:07,110 --> 00:03:07,440
OK.

54
00:03:07,440 --> 00:03:12,930
And this means that we have at least one computer object inside our database.

55
00:03:12,930 --> 00:03:13,440
OK.

56
00:03:13,710 --> 00:03:19,500
So if this condition here evaluates to true then it's going to go inside this statement and execute

57
00:03:19,500 --> 00:03:20,340
this for loop here.

58
00:03:20,340 --> 00:03:23,280
So for I created a for loop here so forth.

59
00:03:23,430 --> 00:03:28,530
And as you can see here first of all I created a variable and I assign the value zero to this variable

60
00:03:28,680 --> 00:03:29,900
which its name is I.

61
00:03:29,970 --> 00:03:30,710
OK.

62
00:03:30,840 --> 00:03:35,880
And then here I created a condition which determines how many times this rule is going to be executed.

63
00:03:35,880 --> 00:03:39,650
So I is less than all computers that size.

64
00:03:39,690 --> 00:03:45,780
So this group is going to be executed until the value of this all variable is less than the size of

65
00:03:45,800 --> 00:03:47,320
these computers list.

66
00:03:47,580 --> 00:03:49,950
And finally here I put this piece of code here.

67
00:03:49,950 --> 00:03:55,110
In order to specify that after each execution of this for loop the value of this all value is going

68
00:03:55,110 --> 00:03:57,040
to be incremented by 1.

69
00:03:57,480 --> 00:03:59,560
And inside this fall who has the answer here.

70
00:03:59,760 --> 00:04:04,990
I created an object of type computer so computer computer assignment operator.

71
00:04:05,190 --> 00:04:10,740
And then I referred to the name of these all computers list which actually holds all the computer objects

72
00:04:11,070 --> 00:04:13,120
that we have inside our database.

73
00:04:13,200 --> 00:04:19,860
So all computers that get high so it's got this gets all it's going to actually give me the specific

74
00:04:19,920 --> 00:04:26,460
object that we have inside this specific index of our array of our database as you can see here.

75
00:04:26,460 --> 00:04:31,170
So for example for the first time that this group is going to be executed the value that is assigned

76
00:04:31,170 --> 00:04:33,360
to this are is zero right.

77
00:04:33,390 --> 00:04:40,140
So all computers that get zero means the first object in sight are all computers at least.

78
00:04:40,290 --> 00:04:40,830
OK.

79
00:04:41,010 --> 00:04:43,620
And it's going to assign that value to these computed object.

80
00:04:43,710 --> 00:04:51,360
And then here in line 61 I am actually initializing these computer name at a list as you can see here

81
00:04:51,660 --> 00:04:52,880
in line 53.

82
00:04:52,890 --> 00:04:54,430
I initialized this on a list here.

83
00:04:54,450 --> 00:04:54,990
OK.

84
00:04:55,230 --> 00:05:00,050
And I specified that this at least this computer's name release is going to be anti-art that you want

85
00:05:00,050 --> 00:05:07,230
to actually add real objects to these computers name at a rate so computers name that add.

86
00:05:07,670 --> 00:05:14,170
So here I refer to the name of this object computer as you can see here that good computer name.

87
00:05:14,210 --> 00:05:19,550
So in this computer class as you can see we have these getters and setters in order to actually access

88
00:05:19,550 --> 00:05:21,950
the values of our instance variables.

89
00:05:21,950 --> 00:05:22,850
Right.

90
00:05:22,850 --> 00:05:27,510
So I can actually get the computer name plus and he had instead of double.

91
00:05:27,530 --> 00:05:31,770
I put this dash here plus computer that gets computer type.

92
00:05:31,970 --> 00:05:35,240
So we have this computer name Dasch computer type.

93
00:05:35,240 --> 00:05:35,940
OK.

94
00:05:36,530 --> 00:05:36,780
And it's.

95
00:05:36,800 --> 00:05:42,290
And this is going to be executed and iteration over all the elements inside the school like the top

96
00:05:42,320 --> 00:05:43,160
which is actually finished.

97
00:05:43,160 --> 00:05:43,690
OK.

98
00:05:43,910 --> 00:05:50,090
So remember that this Smurfette this gets all computers Meffert is going to return all the objects all

99
00:05:50,090 --> 00:05:54,940
the computer optics that we have inside our school database and it's going to be assigned us of the

100
00:05:54,950 --> 00:05:57,180
city's all computers list.

101
00:05:57,260 --> 00:05:59,320
And here we have access to that list.

102
00:05:59,390 --> 00:05:59,950
OK.

103
00:06:00,230 --> 00:06:08,120
And we can actually add singles updates to this computer object and then we can actually add those objects

104
00:06:08,120 --> 00:06:10,180
to these can computers name addy.

105
00:06:10,320 --> 00:06:16,170
OK so now let's I should I should paste in some lines of code here.

106
00:06:16,290 --> 00:06:21,330
So after this if statement here as you can see inside this uncreate Meffert again I want to pasting

107
00:06:21,330 --> 00:06:25,130
some lines of code and then I'm going explain to you what's going on here.

108
00:06:25,140 --> 00:06:29,610
So as you can see here these are the lines of code that I pasted here.

109
00:06:29,820 --> 00:06:36,330
So here are want to instantiate this adapted object that I'd declare inside our class in line 27.

110
00:06:36,330 --> 00:06:41,780
As you can see here I declare this object here at the adapter and the name of this object is adapter.

111
00:06:41,790 --> 00:06:47,880
So now I want to instantiate this adapter object so I referred to the name of this object adapter assignment

112
00:06:47,880 --> 00:06:50,560
operator new at a adapter.

113
00:06:50,730 --> 00:06:53,870
So you want to instantiate this adapter object.

114
00:06:54,060 --> 00:06:59,610
And here are this idea that there are two things against this construct and actually accepts free arguments.

115
00:06:59,610 --> 00:07:01,680
The first one is going to be the context.

116
00:07:01,680 --> 00:07:08,810
So here you could actually just put this key word here or I could just type in main activity that does

117
00:07:09,260 --> 00:07:10,140
so in this case.

118
00:07:10,140 --> 00:07:12,280
In this way we are more specific.

119
00:07:12,300 --> 00:07:12,780
OK.

120
00:07:13,080 --> 00:07:19,560
So this is the context and for the second argument we need to specify how our items inside our List

121
00:07:19,560 --> 00:07:20,790
View are going to look like.

122
00:07:20,820 --> 00:07:23,220
So I want a simple list item.

123
00:07:23,220 --> 00:07:30,250
So I just the first with the name of this android data are that lay out that simple list item one.

124
00:07:30,450 --> 00:07:30,890
OK.

125
00:07:31,080 --> 00:07:37,920
So this means that you want a simple list item 1 and I use this item for my application for my list

126
00:07:37,920 --> 00:07:43,650
view and for the first argument as you can see here we need to provide the values that we want to actually

127
00:07:43,650 --> 00:07:45,060
put in our list.

128
00:07:45,120 --> 00:07:49,980
So the values that I want to put in my list is going to be computer's name right list view.

129
00:07:50,010 --> 00:07:56,190
So this computer's name is going to be an array that can actually hold objects of type computer as you

130
00:07:56,190 --> 00:07:57,830
can see inside is for a loop.

131
00:07:57,840 --> 00:08:03,570
I am actually adding some real objects to this computer's name addy which actually holds values of type

132
00:08:03,570 --> 00:08:03,960
string.

133
00:08:03,970 --> 00:08:08,340
So as you can see I am actually assigning the values of type string to this arii.

134
00:08:08,760 --> 00:08:12,250
So here as you can see we are in here.

135
00:08:12,270 --> 00:08:16,950
I specify that you want to use these values for my list view right.

136
00:08:16,980 --> 00:08:18,590
So in line sixty eight.

137
00:08:18,700 --> 00:08:24,210
Are you referring to the name of this object list view that set adapter adapter.

138
00:08:24,270 --> 00:08:30,000
So here for that for the argument I guess I should be assigned this by the adapter here for the argument

139
00:08:30,000 --> 00:08:31,750
of this set the latter method.

140
00:08:32,100 --> 00:08:39,550
So this is going to be the adapter of this list view and it's going actually specify the lock and the

141
00:08:39,600 --> 00:08:44,340
appearance of the items that we want to put in our list view and the values that you want to put in

142
00:08:44,340 --> 00:08:45,300
my list view.

143
00:08:45,570 --> 00:08:46,230
OK.

144
00:08:46,500 --> 00:08:48,270
So hopefully that makes sense.

145
00:08:48,270 --> 00:08:54,970
And now as you can see here if you have this anklet if it here and here I created this statement.

146
00:08:54,970 --> 00:09:00,060
So when the user clicks on this BT and I hear this case statement is going to be executed and when the

147
00:09:00,060 --> 00:09:04,440
user clicks and it's written delete here this case statement is going to be executed.

148
00:09:04,590 --> 00:09:10,110
So when the user clicks on this BT an ad I want to actually add one item which is of type computer I

149
00:09:10,110 --> 00:09:13,020
want to add that item to the list view.

150
00:09:13,170 --> 00:09:18,960
OK so now I'm going to pasting some lines of code here and then I'm going to explain to you what's going

151
00:09:18,960 --> 00:09:19,560
on here.

152
00:09:19,590 --> 00:09:24,330
So as you can see here these are the lines of code that I actually pasted here.

153
00:09:24,450 --> 00:09:27,200
So now I'm going to explain to you what's going on here.

154
00:09:27,390 --> 00:09:30,300
So first of all as you can see here in line 87.

155
00:09:30,330 --> 00:09:35,240
So now remember that here we are actually inside this case statement of the speedy at.

156
00:09:35,280 --> 00:09:40,230
So when the user clicks on this bit here at these lines of code here is going to be executed.

157
00:09:40,410 --> 00:09:45,180
So in line 87 I created an object of type computer as you can see here.

158
00:09:45,180 --> 00:09:47,660
And here I am actually initializing this object so.

159
00:09:47,670 --> 00:09:49,880
Assignment operator new computer.

160
00:09:50,070 --> 00:09:55,500
And for the first argument I specified that I want to actually get the computer name.

161
00:09:55,500 --> 00:10:00,900
So as you can see here in site our activity underlined minute example if we have this it takes here.

162
00:10:00,900 --> 00:10:01,560
Right.

163
00:10:01,560 --> 00:10:06,330
So here for the first one I want to specify the computer name and for the second one I want to specify

164
00:10:06,330 --> 00:10:07,500
the computer type.

165
00:10:07,500 --> 00:10:13,760
So I want to get the values that the user entered and enters on this editor.

166
00:10:13,830 --> 00:10:20,130
And I want to actually get those values and specify the computer name on the computer name and the computer

167
00:10:20,130 --> 00:10:21,060
type.

168
00:10:21,060 --> 00:10:22,580
So let's go back to our main activity class.

169
00:10:22,570 --> 00:10:27,410
So here I want to get this ADT computer name here that takes that to strange.

170
00:10:27,480 --> 00:10:33,930
So I want to I need to actually convert that value to a string value because this a computer or constructed

171
00:10:33,930 --> 00:10:35,720
needs a string value OK.

172
00:10:35,970 --> 00:10:41,450
And for the second argument we need to specify our understand the value for the ADT computer type.

173
00:10:41,490 --> 00:10:41,960
OK.

174
00:10:42,150 --> 00:10:44,970
So ADT computer type that takes that has three.

175
00:10:45,300 --> 00:10:46,920
So this is our computer object.

176
00:10:46,950 --> 00:10:51,900
When a user clicks on it's PTEN at a computer it's is going to be it's going to be created up with these

177
00:10:51,900 --> 00:10:53,600
values and here.

178
00:10:53,790 --> 00:11:00,560
I created an if statement and here I am saying that if is the computer running that get text the truest

179
00:11:00,560 --> 00:11:08,760
thing that matches an empty string value or EDT computer type that gettext the district that matches

180
00:11:09,090 --> 00:11:11,050
an empty string value.

181
00:11:11,270 --> 00:11:17,290
It's not going to actually execute all the other lines of quote here after this statement.

182
00:11:17,300 --> 00:11:24,320
So we need to actually provide a value for our are actually for our editor texts.

183
00:11:24,440 --> 00:11:25,110
OK.

184
00:11:25,310 --> 00:11:29,850
If they use it for example doesn't provide a value for our text fields.

185
00:11:30,120 --> 00:11:35,180
These are these lines of thought here are not going to be executed so that an object is not going to

186
00:11:35,180 --> 00:11:37,730
be added to our database.

187
00:11:37,900 --> 00:11:40,060
OK so let me I actually did it.

188
00:11:40,250 --> 00:11:45,920
Let me ask you to cut this statement here and let's actually put it here before the creation of this

189
00:11:45,950 --> 00:11:53,450
object because it is better because if the user doesn't provide a value for these for these text fields

190
00:11:53,670 --> 00:11:58,450
it is not going to actually execute these lines of code here and it's not going to actually create an

191
00:11:58,520 --> 00:12:00,260
object of type of type computer.

192
00:12:00,440 --> 00:12:01,860
So it's better to put it here.

193
00:12:01,970 --> 00:12:08,720
And if they use it provides a value for these it it takes all these text fields then it's going to create

194
00:12:08,720 --> 00:12:13,240
an object of type computer and it's going to it's going to actually for the computer.

195
00:12:13,320 --> 00:12:19,790
We I to get the text of this idiotic computer name and then converted this to a string value and it's

196
00:12:19,790 --> 00:12:22,460
going actually for their computer type.

197
00:12:22,480 --> 00:12:28,440
And I try to get these idiotic computer type that get taste and then convert it a string value.

198
00:12:28,880 --> 00:12:35,420
And then here as you can see I'm going to add this computer object to our all computers list.

199
00:12:35,710 --> 00:12:36,190
OK.

200
00:12:36,410 --> 00:12:42,560
So we need to add this computer object to our computers at least and then in 1993 I am actually adding

201
00:12:42,590 --> 00:12:49,340
this computer object to our database database handler that adds computer computer.

202
00:12:49,340 --> 00:12:54,170
So if we need to add this object to our school database this is very important.

203
00:12:54,230 --> 00:12:57,010
And then in 1994 as you can see here.

204
00:12:57,050 --> 00:13:02,640
So here as you can see I am actually assigning a string value to these computer names.

205
00:13:02,700 --> 00:13:04,660
Treat these computers name at 8.

206
00:13:04,730 --> 00:13:10,220
So here I referred to that name of these computers named at a here as you can see we have this at de-listed

207
00:13:10,250 --> 00:13:12,250
as you can see in line 23.

208
00:13:12,260 --> 00:13:17,090
I actually declared this at least and its name is computerless name here.

209
00:13:17,300 --> 00:13:23,020
And this at least is going to actually accept values that are of type strange and inside this uncreate

210
00:13:23,030 --> 00:13:29,270
method here as you can see I am actually instantiating these computers name at a here.

211
00:13:29,360 --> 00:13:30,010
OK.

212
00:13:30,320 --> 00:13:35,750
And here as you can see I have this if statement and in say this if statement I created a for loop in

213
00:13:35,750 --> 00:13:40,000
order to actually get the values from the skill light as you can see here.

214
00:13:40,130 --> 00:13:45,060
And then we are actually assigning those values to string values to this computer's name.

215
00:13:45,090 --> 00:13:51,010
And if we have actually objects if we have computed objects inside our schools.

216
00:13:51,040 --> 00:13:51,350
OK.

217
00:13:51,420 --> 00:13:52,420
Inside is uncreate me.

218
00:13:52,490 --> 00:13:55,150
I actually added these lines of code here.

219
00:13:55,340 --> 00:14:01,190
But when the user clicks on these add button I want to actually add this computer object here as you

220
00:14:01,190 --> 00:14:01,800
can see.

221
00:14:01,850 --> 00:14:04,510
I want to add this computer object into the database.

222
00:14:04,640 --> 00:14:09,830
And I want to actually get us think rather you kept the computer name and the computer name.

223
00:14:09,830 --> 00:14:11,710
These are actually string values right.

224
00:14:11,710 --> 00:14:15,720
I want to get these values and assigned him to these computers named Ari.

225
00:14:15,800 --> 00:14:16,360
OK.

226
00:14:16,610 --> 00:14:21,820
So then they use it for example or clicks and this at button on a computer object is going to be created

227
00:14:22,080 --> 00:14:22,470
and.

228
00:14:22,610 --> 00:14:27,920
And the computer name and the computer type as you can see here are going to be added to the computer's

229
00:14:27,920 --> 00:14:28,930
name address here.

230
00:14:28,940 --> 00:14:36,410
So these values are going to be a string value as you can see I am actually adding these values together.

231
00:14:36,410 --> 00:14:42,210
I am actually concatenating the value of this a computer name with disvalue computer type.

232
00:14:42,320 --> 00:14:44,680
And we have a dash between these two values.

233
00:14:44,720 --> 00:14:45,470
OK.

234
00:14:45,770 --> 00:14:52,790
And here in 1995 after we added this computer object to the database and then we added this computed

235
00:14:52,790 --> 00:14:54,050
object to our three.

236
00:14:54,150 --> 00:14:56,180
At least he had as he can see.

237
00:14:56,240 --> 00:15:01,460
I want to actually set the text of our editor The Artist field to.

238
00:15:01,670 --> 00:15:08,450
Interesting value as you can see here and here I want to set the text of our computer type a computer

239
00:15:08,450 --> 00:15:12,600
type to another OTTWAY actually an empty string value OK.

240
00:15:13,010 --> 00:15:15,150
And here I fooled approach statement.

241
00:15:15,260 --> 00:15:22,460
OK so now let's me actually pasting some lines of code here for this PTEN dealing here inside the city

242
00:15:22,470 --> 00:15:27,260
in which case here I want to paste in some lines of code and then I'm gonna explain to you what's going

243
00:15:27,260 --> 00:15:27,910
on here.

