So this is going to be an empty constructor.
So let's actually create another constructor so remember that I told you you can actually create multiple
constructors for your classes.
Right.
So here I can just type in public access modifier is public and the name of the constructor must be
the same as the name of this class.
So the name of this class is computer right.
And now this time I want to actually provide some arguments for this constructor.
The first argument is going to be of type integer and the name of the first argument is going to be
id comma and the second argument is going to be of type strange and the name of this argument is going
to be for example computer name as you can see here.
Come on.
And this time stream.
As you can see the first argument is going to be off the upstreams and the name of the first argument
is going to be computer type and that I need to open and close this constructed by using these curly
braces.
So now I can actually instantiate these instance variables that are declared inside this computer class
here inside the constructor.
So I can just paint a computer name or at least that computer name.
OK.
Does that computer name as you can see here.
So here I am actually referring to this instance variable that I actually declared in inside this computer
class not this argument.
OK.
By putting this key word here I am specifying that I want to refer to this instance variable.
OK.
Inside this computer class.
So this they can start a computer named assignment operator.
And here I want to allow the first with the name of these arguments computer name.
OK.
And then I need to put a semicolon at the end of my statement here.
And here I want to I try to instantiate this computer type so I can just type in these computer type
assignment operator and then here I can I try to refer to the name of this argument computer type computer
type.
And then I need to put a semi-colon at the end of my statement and here as you can see I actually instantiated
these two are instance variables.
So let's actually instantiate this ID.
OK so this thought Id assignment operator ID OK here by just typing this stuff id I am referring to
this ID instance variable and here I am actually assigning this ID this ID argument to this instance
value right.
So hopefully that makes sense.
And now lets actually create another constructor OK so public and the name of the constructor must be
the same as the name of the class.
So the name of the class is computer and inside Apprentice's.
Here again just type in strange and the name of the first argument is going to be a computer name.
So this time I want.
I dont want to actually provide an ID for this constructor OK I just need to I just want to provide
the computer name and the computer type so strange computer type and then I need to open and close.
This is constructed by using these curly braces.
OK.
So of enever other classes I want to actually create an object from the computer class.
They can actually provide an ID or they can actually not provide an ID for the constructor OK.
So here I provided another constructor in order to actually let the other classes that want to create
an object from this public and this computer class to actually create an object by just assigning a
computer name and the computer type ok and not the computer ID as you can see here this ID.
So here I can just instantiate these instance variables that I have inside my computer class.
So this thought computer name assignment operator computer name semicolon this thot computer type assignment
operator computer type.
And then I need to put a semi-colon at the end of my statement.
So now I want to actually provide some getters and setters for these instance variables here.
So here inside this I mean activity class as you can see inside the curly braces of this main.
If the class or you just need to right click here and then Caly can generate as you can see here generate
and then he actually can get in and sit here and just select all of these instance variables here.
Okay.
And then click on OK.
So here as you can see here the ID automatically generated these getters and setters for me should get
ID set.
Id get computer names with computer name gets computer type set computer type.
OK.
So now I want to actually create an underclass in order to handle my school database.
OK I want to actually save the data into the database and then retrieve the data.
When ever I want to from that database.
OK.
So now I just need to create another class.
So just select this package here right click on it new and then click on Java class and then for the
name of the class just type in here.
My school light my light handler OK this is going to be the name of our school class of our handler
class.
So just click on this OK here.
So now let's actually double click on the tab here.
My school right handed a tab so that this actually does editor area is now wider.
And this class this is too late handler class needs to actually inherit needs to inherit from the school
late.
Our open helper class.
So first of all I'm going to actually pasting some lines of code here and then I'm going to explain
to you what's going on here.
So as you can see here these are the lines of code that actually paste that he had in say piece my light
handler class.
So first of all let me explain to you what's going on here.
So as you can see yet I created a comment inline 12 here and it says database version.
So here as you can see I created a constant which is of type integer as you can see here.
And this constant is private's.
Ok private static final INT database version.
OK.
So here I am specifying the version of the database.
So here I assigned a value in 1 to this a constant so that the version of my database is one.
OK.
And this means that this is the first database that I am truly creating for this application.
OK.
So in line number 15 as you can see here I created another comment database name.
So now I want to specify the name of the database or keep private static final strange database name.
So as you can see here the data type of this constant is Stream.
And here I want to specify the name of the database.
So inside it because I just need to type in the computer.
This is the name of my database DB.
So as you can see here this is very important stuff but it is really important.
This is where I am actually specifying the format the format of my database which is which must be DB.
OK Computer that DBI.
And here as you can see I want to actually create a name for my table.
OK.
So because I have a school late database I need to specify a name for the table of that database.
OK.
So a computer a table name and in line 19 as you can see here private static final stream.
So I have a constant which is actually of type streams and the name of this constant is table computer.
And he had a scientist value computers for the name of my table or table computer.
And here as he has it he had in lines 22 Frue on line number 24.
As you can see I am specifying the columns of my computer table.
OK.
So in line number 22 as you can see here private static final.
This is actually a constant which is tied into this stream.
As you can see here the data type of this constant is strange and the name of this constant is column
Id.
OK so here I am specifying the column Id and I assigned the value ID to this constant and in line number
23 private static final strange computed column computer name.
So here I am specifying the name of the cut column computer.
OK.
So computer Cullom computer name I assigned despite your computer name to this column.
As you can see an inline number 24.
I created another constant private static final streambed column computer type.
So I want to specify the type of the name of the type the name of the column of the type of this computer.
Ok Cullom computer type computer type and its value this string value is constant.
OK so this is very important.
We need to specify the columns of our table.
The first one is column ID.
The second one is column computer name and the first one is Cullom computer type.
So now we want to paste in some more lines of code here and then I'm going to explain to you what's
going on here.
So as you can see here these are the lines of code that I actually pasted here.
So as you can see here I'm actually creating a variable.
OK.
And the name of this variable is create computer table.
OK.
And as you can see here the data type of this variable is 3.
So this variable is going to actually hold a string value.
OK.
So assignment operator with an assignment operator here as you can see here here.
This is actually.
And as to light a comment.
OK.
In order to create a table for our application.
So as you can see here inside the double quotes I put this create here create space as you can see here
table space.
And here I need to specify the name of our table locatable computer as you can see here.
I created this constant in line number 19 in order to specify the name of our table which is actually
the computer's right.
So here I referred to the name of this constant.
OK.
In order to access it's value right.
So table computer plus and here I am actually inside it because I actually put this opening up Prentice's
here as you can see opening Apprentice's.
And here I put A-plus operator and then here I specify the ID the column Id plus.
And as you can see here in say the double quotes as you can see first of what I put a space here.
Space integer primary key.
OK.
So this is going to be the integer primary key.
This idea is going to be the integer primary key which is going to be incremented automatically for
us.
For example the first item that we add to our Escuela database is ID is going to be number one or the
second item that we add to our database.
It's ID its column Id is going to be number two.
OK.
Thats why we put these values here.
Integer primary key.
Okay.
And here I put a comma here as you can see space and then I put a plus operator here and then here I
referred to the name of this column column computer name as you can see here.
This is our second column column computer name plus.
And here I am specifying that this column is going to actually hold the values that are actually the
text values that are Stream right.
So as you can see inside the double quotes first I put a space here and then I put this value text comma
and then I put another space here.
So here as you can see I put a plus operator and then I need to specify the first column which is actually
column computer type ok.
Plus as you can see and hit inside the double quotes as you can see here space text.
So here again I miss specifying that the value of this column computer type is going to be text.
OK.
And then I put a plus operator and then here this is actually the ending Apprentice's here.
OK.
So these values are actually inside Apprentice's and this is an opening but prentices and this is the
end in prentices right.
And here I put a semicolon at the end of my statement.
So here inside this my as light handler class I need to provide a constructor for this class.