1
00:00:00,240 --> 00:00:02,210
So this is going to be an empty constructor.

2
00:00:02,370 --> 00:00:08,340
So let's actually create another constructor so remember that I told you you can actually create multiple

3
00:00:08,340 --> 00:00:09,920
constructors for your classes.

4
00:00:09,930 --> 00:00:10,460
Right.

5
00:00:10,650 --> 00:00:17,160
So here I can just type in public access modifier is public and the name of the constructor must be

6
00:00:17,160 --> 00:00:18,840
the same as the name of this class.

7
00:00:18,900 --> 00:00:21,300
So the name of this class is computer right.

8
00:00:21,420 --> 00:00:26,340
And now this time I want to actually provide some arguments for this constructor.

9
00:00:26,340 --> 00:00:30,660
The first argument is going to be of type integer and the name of the first argument is going to be

10
00:00:30,660 --> 00:00:37,260
id comma and the second argument is going to be of type strange and the name of this argument is going

11
00:00:37,260 --> 00:00:41,700
to be for example computer name as you can see here.

12
00:00:41,780 --> 00:00:42,550
Come on.

13
00:00:42,870 --> 00:00:44,140
And this time stream.

14
00:00:44,250 --> 00:00:48,420
As you can see the first argument is going to be off the upstreams and the name of the first argument

15
00:00:48,420 --> 00:00:55,200
is going to be computer type and that I need to open and close this constructed by using these curly

16
00:00:55,200 --> 00:00:55,920
braces.

17
00:00:55,920 --> 00:01:02,100
So now I can actually instantiate these instance variables that are declared inside this computer class

18
00:01:02,190 --> 00:01:03,850
here inside the constructor.

19
00:01:04,050 --> 00:01:07,920
So I can just paint a computer name or at least that computer name.

20
00:01:08,130 --> 00:01:08,680
OK.

21
00:01:08,700 --> 00:01:10,680
Does that computer name as you can see here.

22
00:01:10,680 --> 00:01:17,160
So here I am actually referring to this instance variable that I actually declared in inside this computer

23
00:01:17,160 --> 00:01:18,890
class not this argument.

24
00:01:18,890 --> 00:01:19,090
OK.

25
00:01:19,090 --> 00:01:25,410
By putting this key word here I am specifying that I want to refer to this instance variable.

26
00:01:25,460 --> 00:01:25,770
OK.

27
00:01:25,770 --> 00:01:27,270
Inside this computer class.

28
00:01:27,270 --> 00:01:30,900
So this they can start a computer named assignment operator.

29
00:01:31,050 --> 00:01:35,000
And here I want to allow the first with the name of these arguments computer name.

30
00:01:35,390 --> 00:01:36,070
OK.

31
00:01:36,120 --> 00:01:39,390
And then I need to put a semicolon at the end of my statement here.

32
00:01:39,750 --> 00:01:46,950
And here I want to I try to instantiate this computer type so I can just type in these computer type

33
00:01:47,580 --> 00:01:54,000
assignment operator and then here I can I try to refer to the name of this argument computer type computer

34
00:01:54,000 --> 00:01:54,410
type.

35
00:01:54,510 --> 00:02:00,960
And then I need to put a semi-colon at the end of my statement and here as you can see I actually instantiated

36
00:02:00,960 --> 00:02:03,340
these two are instance variables.

37
00:02:03,360 --> 00:02:05,800
So let's actually instantiate this ID.

38
00:02:05,880 --> 00:02:16,200
OK so this thought Id assignment operator ID OK here by just typing this stuff id I am referring to

39
00:02:16,200 --> 00:02:22,650
this ID instance variable and here I am actually assigning this ID this ID argument to this instance

40
00:02:22,650 --> 00:02:23,980
value right.

41
00:02:24,240 --> 00:02:25,860
So hopefully that makes sense.

42
00:02:25,920 --> 00:02:33,570
And now lets actually create another constructor OK so public and the name of the constructor must be

43
00:02:33,570 --> 00:02:35,040
the same as the name of the class.

44
00:02:35,100 --> 00:02:38,840
So the name of the class is computer and inside Apprentice's.

45
00:02:38,920 --> 00:02:45,950
Here again just type in strange and the name of the first argument is going to be a computer name.

46
00:02:46,020 --> 00:02:46,950
So this time I want.

47
00:02:46,950 --> 00:02:52,890
I dont want to actually provide an ID for this constructor OK I just need to I just want to provide

48
00:02:53,040 --> 00:03:02,910
the computer name and the computer type so strange computer type and then I need to open and close.

49
00:03:02,920 --> 00:03:05,870
This is constructed by using these curly braces.

50
00:03:05,880 --> 00:03:06,400
OK.

51
00:03:06,400 --> 00:03:11,760
So of enever other classes I want to actually create an object from the computer class.

52
00:03:11,760 --> 00:03:18,210
They can actually provide an ID or they can actually not provide an ID for the constructor OK.

53
00:03:18,270 --> 00:03:24,090
So here I provided another constructor in order to actually let the other classes that want to create

54
00:03:24,120 --> 00:03:30,150
an object from this public and this computer class to actually create an object by just assigning a

55
00:03:30,150 --> 00:03:35,490
computer name and the computer type ok and not the computer ID as you can see here this ID.

56
00:03:35,490 --> 00:03:42,080
So here I can just instantiate these instance variables that I have inside my computer class.

57
00:03:42,120 --> 00:03:52,500
So this thought computer name assignment operator computer name semicolon this thot computer type assignment

58
00:03:52,530 --> 00:03:54,790
operator computer type.

59
00:03:54,900 --> 00:03:58,470
And then I need to put a semi-colon at the end of my statement.

60
00:03:58,530 --> 00:04:04,280
So now I want to actually provide some getters and setters for these instance variables here.

61
00:04:04,410 --> 00:04:09,170
So here inside this I mean activity class as you can see inside the curly braces of this main.

62
00:04:09,200 --> 00:04:15,060
If the class or you just need to right click here and then Caly can generate as you can see here generate

63
00:04:15,870 --> 00:04:21,180
and then he actually can get in and sit here and just select all of these instance variables here.

64
00:04:21,230 --> 00:04:21,880
Okay.

65
00:04:21,900 --> 00:04:23,590
And then click on OK.

66
00:04:23,760 --> 00:04:29,310
So here as you can see here the ID automatically generated these getters and setters for me should get

67
00:04:29,370 --> 00:04:29,950
ID set.

68
00:04:29,970 --> 00:04:35,470
Id get computer names with computer name gets computer type set computer type.

69
00:04:35,500 --> 00:04:36,060
OK.

70
00:04:36,390 --> 00:04:43,450
So now I want to actually create an underclass in order to handle my school database.

71
00:04:43,490 --> 00:04:49,120
OK I want to actually save the data into the database and then retrieve the data.

72
00:04:49,240 --> 00:04:52,770
When ever I want to from that database.

73
00:04:52,790 --> 00:04:53,260
OK.

74
00:04:53,550 --> 00:04:57,500
So now I just need to create another class.

75
00:04:57,570 --> 00:05:04,460
So just select this package here right click on it new and then click on Java class and then for the

76
00:05:04,460 --> 00:05:06,510
name of the class just type in here.

77
00:05:06,660 --> 00:05:16,910
My school light my light handler OK this is going to be the name of our school class of our handler

78
00:05:16,910 --> 00:05:17,590
class.

79
00:05:17,600 --> 00:05:19,640
So just click on this OK here.

80
00:05:19,640 --> 00:05:22,370
So now let's actually double click on the tab here.

81
00:05:22,390 --> 00:05:27,770
My school right handed a tab so that this actually does editor area is now wider.

82
00:05:27,770 --> 00:05:35,410
And this class this is too late handler class needs to actually inherit needs to inherit from the school

83
00:05:35,440 --> 00:05:36,730
late.

84
00:05:37,430 --> 00:05:39,240
Our open helper class.

85
00:05:39,260 --> 00:05:45,080
So first of all I'm going to actually pasting some lines of code here and then I'm going to explain

86
00:05:45,080 --> 00:05:46,960
to you what's going on here.

87
00:05:46,970 --> 00:05:53,030
So as you can see here these are the lines of code that actually paste that he had in say piece my light

88
00:05:53,090 --> 00:05:54,250
handler class.

89
00:05:54,410 --> 00:05:57,420
So first of all let me explain to you what's going on here.

90
00:05:57,590 --> 00:06:03,050
So as you can see yet I created a comment inline 12 here and it says database version.

91
00:06:03,080 --> 00:06:08,370
So here as you can see I created a constant which is of type integer as you can see here.

92
00:06:08,570 --> 00:06:10,210
And this constant is private's.

93
00:06:10,370 --> 00:06:14,920
Ok private static final INT database version.

94
00:06:15,120 --> 00:06:15,580
OK.

95
00:06:15,740 --> 00:06:19,610
So here I am specifying the version of the database.

96
00:06:19,700 --> 00:06:25,760
So here I assigned a value in 1 to this a constant so that the version of my database is one.

97
00:06:25,820 --> 00:06:26,530
OK.

98
00:06:26,810 --> 00:06:31,920
And this means that this is the first database that I am truly creating for this application.

99
00:06:32,150 --> 00:06:32,650
OK.

100
00:06:32,780 --> 00:06:38,570
So in line number 15 as you can see here I created another comment database name.

101
00:06:38,570 --> 00:06:46,530
So now I want to specify the name of the database or keep private static final strange database name.

102
00:06:46,580 --> 00:06:50,670
So as you can see here the data type of this constant is Stream.

103
00:06:50,930 --> 00:06:53,740
And here I want to specify the name of the database.

104
00:06:53,900 --> 00:06:57,100
So inside it because I just need to type in the computer.

105
00:06:57,110 --> 00:06:59,660
This is the name of my database DB.

106
00:06:59,870 --> 00:07:04,100
So as you can see here this is very important stuff but it is really important.

107
00:07:04,100 --> 00:07:10,650
This is where I am actually specifying the format the format of my database which is which must be DB.

108
00:07:10,920 --> 00:07:13,160
OK Computer that DBI.

109
00:07:13,490 --> 00:07:18,720
And here as you can see I want to actually create a name for my table.

110
00:07:18,830 --> 00:07:19,340
OK.

111
00:07:19,460 --> 00:07:26,920
So because I have a school late database I need to specify a name for the table of that database.

112
00:07:26,930 --> 00:07:27,390
OK.

113
00:07:27,560 --> 00:07:34,210
So a computer a table name and in line 19 as you can see here private static final stream.

114
00:07:34,220 --> 00:07:40,380
So I have a constant which is actually of type streams and the name of this constant is table computer.

115
00:07:40,610 --> 00:07:46,840
And he had a scientist value computers for the name of my table or table computer.

116
00:07:46,970 --> 00:07:52,300
And here as he has it he had in lines 22 Frue on line number 24.

117
00:07:52,310 --> 00:07:56,490
As you can see I am specifying the columns of my computer table.

118
00:07:56,560 --> 00:07:57,030
OK.

119
00:07:57,110 --> 00:08:00,930
So in line number 22 as you can see here private static final.

120
00:08:01,050 --> 00:08:03,860
This is actually a constant which is tied into this stream.

121
00:08:03,890 --> 00:08:09,470
As you can see here the data type of this constant is strange and the name of this constant is column

122
00:08:09,560 --> 00:08:10,180
Id.

123
00:08:10,340 --> 00:08:17,900
OK so here I am specifying the column Id and I assigned the value ID to this constant and in line number

124
00:08:17,980 --> 00:08:23,490
23 private static final strange computed column computer name.

125
00:08:23,510 --> 00:08:27,970
So here I am specifying the name of the cut column computer.

126
00:08:28,000 --> 00:08:28,500
OK.

127
00:08:28,680 --> 00:08:34,720
So computer Cullom computer name I assigned despite your computer name to this column.

128
00:08:34,790 --> 00:08:37,440
As you can see an inline number 24.

129
00:08:37,460 --> 00:08:43,410
I created another constant private static final streambed column computer type.

130
00:08:43,430 --> 00:08:50,890
So I want to specify the type of the name of the type the name of the column of the type of this computer.

131
00:08:50,930 --> 00:08:56,630
Ok Cullom computer type computer type and its value this string value is constant.

132
00:08:56,720 --> 00:08:57,890
OK so this is very important.

133
00:08:57,890 --> 00:09:00,760
We need to specify the columns of our table.

134
00:09:01,190 --> 00:09:02,540
The first one is column ID.

135
00:09:02,540 --> 00:09:07,200
The second one is column computer name and the first one is Cullom computer type.

136
00:09:07,220 --> 00:09:11,660
So now we want to paste in some more lines of code here and then I'm going to explain to you what's

137
00:09:11,660 --> 00:09:12,730
going on here.

138
00:09:12,740 --> 00:09:17,540
So as you can see here these are the lines of code that I actually pasted here.

139
00:09:17,720 --> 00:09:21,000
So as you can see here I'm actually creating a variable.

140
00:09:21,140 --> 00:09:21,730
OK.

141
00:09:21,890 --> 00:09:25,580
And the name of this variable is create computer table.

142
00:09:25,880 --> 00:09:26,340
OK.

143
00:09:26,390 --> 00:09:29,750
And as you can see here the data type of this variable is 3.

144
00:09:29,780 --> 00:09:33,570
So this variable is going to actually hold a string value.

145
00:09:33,830 --> 00:09:34,390
OK.

146
00:09:34,490 --> 00:09:38,750
So assignment operator with an assignment operator here as you can see here here.

147
00:09:38,780 --> 00:09:39,720
This is actually.

148
00:09:39,830 --> 00:09:41,440
And as to light a comment.

149
00:09:41,480 --> 00:09:41,750
OK.

150
00:09:41,750 --> 00:09:45,240
In order to create a table for our application.

151
00:09:45,260 --> 00:09:51,740
So as you can see here inside the double quotes I put this create here create space as you can see here

152
00:09:51,920 --> 00:09:53,940
table space.

153
00:09:54,290 --> 00:09:59,570
And here I need to specify the name of our table locatable computer as you can see here.

154
00:09:59,720 --> 00:10:06,060
I created this constant in line number 19 in order to specify the name of our table which is actually

155
00:10:06,060 --> 00:10:07,330
the computer's right.

156
00:10:07,340 --> 00:10:10,370
So here I referred to the name of this constant.

157
00:10:10,490 --> 00:10:11,020
OK.

158
00:10:11,060 --> 00:10:11,310
OK.

159
00:10:11,310 --> 00:10:13,270
In order to access it's value right.

160
00:10:13,270 --> 00:10:21,530
So table computer plus and here I am actually inside it because I actually put this opening up Prentice's

161
00:10:21,550 --> 00:10:25,270
here as you can see opening Apprentice's.

162
00:10:25,390 --> 00:10:32,580
And here I put A-plus operator and then here I specify the ID the column Id plus.

163
00:10:32,620 --> 00:10:37,400
And as you can see here in say the double quotes as you can see first of what I put a space here.

164
00:10:37,580 --> 00:10:39,770
Space integer primary key.

165
00:10:40,100 --> 00:10:40,570
OK.

166
00:10:40,630 --> 00:10:43,360
So this is going to be the integer primary key.

167
00:10:43,360 --> 00:10:48,400
This idea is going to be the integer primary key which is going to be incremented automatically for

168
00:10:48,430 --> 00:10:48,690
us.

169
00:10:48,700 --> 00:10:55,690
For example the first item that we add to our Escuela database is ID is going to be number one or the

170
00:10:55,690 --> 00:10:57,790
second item that we add to our database.

171
00:10:57,800 --> 00:11:00,680
It's ID its column Id is going to be number two.

172
00:11:00,800 --> 00:11:01,280
OK.

173
00:11:01,330 --> 00:11:03,580
Thats why we put these values here.

174
00:11:03,610 --> 00:11:05,320
Integer primary key.

175
00:11:05,650 --> 00:11:06,200
Okay.

176
00:11:06,370 --> 00:11:13,960
And here I put a comma here as you can see space and then I put a plus operator here and then here I

177
00:11:13,960 --> 00:11:18,250
referred to the name of this column column computer name as you can see here.

178
00:11:18,250 --> 00:11:21,630
This is our second column column computer name plus.

179
00:11:21,670 --> 00:11:26,500
And here I am specifying that this column is going to actually hold the values that are actually the

180
00:11:26,500 --> 00:11:28,990
text values that are Stream right.

181
00:11:29,020 --> 00:11:35,980
So as you can see inside the double quotes first I put a space here and then I put this value text comma

182
00:11:36,480 --> 00:11:38,600
and then I put another space here.

183
00:11:38,620 --> 00:11:44,010
So here as you can see I put a plus operator and then I need to specify the first column which is actually

184
00:11:44,050 --> 00:11:46,520
column computer type ok.

185
00:11:46,780 --> 00:11:53,760
Plus as you can see and hit inside the double quotes as you can see here space text.

186
00:11:53,770 --> 00:11:58,330
So here again I miss specifying that the value of this column computer type is going to be text.

187
00:11:58,390 --> 00:11:59,090
OK.

188
00:11:59,500 --> 00:12:05,220
And then I put a plus operator and then here this is actually the ending Apprentice's here.

189
00:12:05,380 --> 00:12:05,790
OK.

190
00:12:05,830 --> 00:12:11,470
So these values are actually inside Apprentice's and this is an opening but prentices and this is the

191
00:12:11,470 --> 00:12:12,990
end in prentices right.

192
00:12:13,290 --> 00:12:16,910
And here I put a semicolon at the end of my statement.

193
00:12:16,930 --> 00:12:23,500
So here inside this my as light handler class I need to provide a constructor for this class.

