So as you can see here these are the lines of code that I actually pasted here.
So first what I want to actually instantiate this database handler object that I declared in line 25
as you can see here I declared an object of type.
Why is your handler.
And first of all I want to instantiate that object.
So database handler assignment operator new.
My to light my light handler.
And as an argument we need to pass the context.
So the context is this class main activity that this at 11:52 as you can see here.
I actually want to instantiate this all computerless objects.
So as you can see here I declared this object which is of type list as you can see here.
So remember that list is actually an interface which had not actually created directly an object of
type list.
OK so we need to instantiate this list object by using the Aurelia's class.
OK.
But this list interface has more actually more methods and we can use those methods in order to learn
to write our code better.
Ok so now as you can see I want to actually instantiate is all computers object.
So here as you can see in line 52 insight is uncreate method I referred to the name of this object.
All computers.
Assignment operator database handler.
You refer to the name of this object database handler that gets all computers.
So by referring to the name of this object a database handler I can refer to the name of the Smurfit
that I put inside this is too late handler class.
So let's go inside this my skillet handler class as you can see I have the Smurfit here gets all computers
objects as you can see here getting all computer objects by using this mirror that can actually get
all the computer objects that we have inside our database.
OK.
So here I'll refer to the name of this Meffert and then it can actually initialize this all computerless
the least.
OK.
This Arrey on here as you can see inline 50 free as you can see here computer's name assignment operator
here.
New at list.
So it's going.
So here I am just initializing these computers name on a list object as you can see here.
This is going to be an empty Aure because we haven't actually assigned any values to this area yet.
OK.
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
going on here.
So as you can see here these are lines of code that I actually pasted here.
So if all computers that size is greater than zero.
OK.
And this means if the size of this all computers at least is greater than zero.
OK.
Remember that it's all computers is actually an addy.
OK so I can I should get the size the size.
If it is going I should return the number of elements that we have inside our list here.
OK.
So if all computers that size is greater than zero if this means that if we have any objects inside
our school database OK.
If the number of objects inside our database is greater than zero.
OK.
And this means that we have at least one computer object inside our database.
OK.
So if this condition here evaluates to true then it's going to go inside this statement and execute
this for loop here.
So for I created a for loop here so forth.
And as you can see here first of all I created a variable and I assign the value zero to this variable
which its name is I.
OK.
And then here I created a condition which determines how many times this rule is going to be executed.
So I is less than all computers that size.
So this group is going to be executed until the value of this all variable is less than the size of
these computers list.
And finally here I put this piece of code here.
In order to specify that after each execution of this for loop the value of this all value is going
to be incremented by 1.
And inside this fall who has the answer here.
I created an object of type computer so computer computer assignment operator.
And then I referred to the name of these all computers list which actually holds all the computer objects
that we have inside our database.
So all computers that get high so it's got this gets all it's going to actually give me the specific
object that we have inside this specific index of our array of our database as you can see here.
So for example for the first time that this group is going to be executed the value that is assigned
to this are is zero right.
So all computers that get zero means the first object in sight are all computers at least.
OK.
And it's going to assign that value to these computed object.
And then here in line 61 I am actually initializing these computer name at a list as you can see here
in line 53.
I initialized this on a list here.
OK.
And I specified that this at least this computer's name release is going to be anti-art that you want
to actually add real objects to these computers name at a rate so computers name that add.
So here I refer to the name of this object computer as you can see here that good computer name.
So in this computer class as you can see we have these getters and setters in order to actually access
the values of our instance variables.
Right.
So I can actually get the computer name plus and he had instead of double.
I put this dash here plus computer that gets computer type.
So we have this computer name Dasch computer type.
OK.
And it's.
And this is going to be executed and iteration over all the elements inside the school like the top
which is actually finished.
OK.
So remember that this Smurfette this gets all computers Meffert is going to return all the objects all
the computer optics that we have inside our school database and it's going to be assigned us of the
city's all computers list.
And here we have access to that list.
OK.
And we can actually add singles updates to this computer object and then we can actually add those objects
to these can computers name addy.
OK so now let's I should I should paste in some lines of code here.
So after this if statement here as you can see inside this uncreate Meffert again I want to pasting
some lines of code and then I'm going explain to you what's going on here.
So as you can see here these are the lines of code that I pasted here.
So here are want to instantiate this adapted object that I'd declare inside our class in line 27.
As you can see here I declare this object here at the adapter and the name of this object is adapter.
So now I want to instantiate this adapter object so I referred to the name of this object adapter assignment
operator new at a adapter.
So you want to instantiate this adapter object.
And here are this idea that there are two things against this construct and actually accepts free arguments.
The first one is going to be the context.
So here you could actually just put this key word here or I could just type in main activity that does
so in this case.
In this way we are more specific.
OK.
So this is the context and for the second argument we need to specify how our items inside our List
View are going to look like.
So I want a simple list item.
So I just the first with the name of this android data are that lay out that simple list item one.
OK.
So this means that you want a simple list item 1 and I use this item for my application for my list
view and for the first argument as you can see here we need to provide the values that we want to actually
put in our list.
So the values that I want to put in my list is going to be computer's name right list view.
So this computer's name is going to be an array that can actually hold objects of type computer as you
can see inside is for a loop.
I am actually adding some real objects to this computer's name addy which actually holds values of type
string.
So as you can see I am actually assigning the values of type string to this arii.
So here as you can see we are in here.
I specify that you want to use these values for my list view right.
So in line sixty eight.
Are you referring to the name of this object list view that set adapter adapter.
So here for that for the argument I guess I should be assigned this by the adapter here for the argument
of this set the latter method.
So this is going to be the adapter of this list view and it's going actually specify the lock and the
appearance of the items that we want to put in our list view and the values that you want to put in
my list view.
OK.
So hopefully that makes sense.
And now as you can see here if you have this anklet if it here and here I created this statement.
So when the user clicks on this BT and I hear this case statement is going to be executed and when the
user clicks and it's written delete here this case statement is going to be executed.
So when the user clicks on this BT an ad I want to actually add one item which is of type computer I
want to add that item to the list view.
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
on here.
So as you can see here these are the lines of code that I actually pasted here.
So now I'm going to explain to you what's going on here.
So first of all as you can see here in line 87.
So now remember that here we are actually inside this case statement of the speedy at.
So when the user clicks on this bit here at these lines of code here is going to be executed.
So in line 87 I created an object of type computer as you can see here.
And here I am actually initializing this object so.
Assignment operator new computer.
And for the first argument I specified that I want to actually get the computer name.
So as you can see here in site our activity underlined minute example if we have this it takes here.
Right.
So here for the first one I want to specify the computer name and for the second one I want to specify
the computer type.
So I want to get the values that the user entered and enters on this editor.
And I want to actually get those values and specify the computer name on the computer name and the computer
type.
So let's go back to our main activity class.
So here I want to get this ADT computer name here that takes that to strange.
So I want to I need to actually convert that value to a string value because this a computer or constructed
needs a string value OK.
And for the second argument we need to specify our understand the value for the ADT computer type.
OK.
So ADT computer type that takes that has three.
So this is our computer object.
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
values and here.
I created an if statement and here I am saying that if is the computer running that get text the truest
thing that matches an empty string value or EDT computer type that gettext the district that matches
an empty string value.
It's not going to actually execute all the other lines of quote here after this statement.
So we need to actually provide a value for our are actually for our editor texts.
OK.
If they use it for example doesn't provide a value for our text fields.
These are these lines of thought here are not going to be executed so that an object is not going to
be added to our database.
OK so let me I actually did it.
Let me ask you to cut this statement here and let's actually put it here before the creation of this
object because it is better because if the user doesn't provide a value for these for these text fields
it is not going to actually execute these lines of code here and it's not going to actually create an
object of type of type computer.
So it's better to put it here.
And if they use it provides a value for these it it takes all these text fields then it's going to create
an object of type computer and it's going to it's going to actually for the computer.
We I to get the text of this idiotic computer name and then converted this to a string value and it's
going actually for their computer type.
And I try to get these idiotic computer type that get taste and then convert it a string value.
And then here as you can see I'm going to add this computer object to our all computers list.
OK.
So we need to add this computer object to our computers at least and then in 1993 I am actually adding
this computer object to our database database handler that adds computer computer.
So if we need to add this object to our school database this is very important.
And then in 1994 as you can see here.
So here as you can see I am actually assigning a string value to these computer names.
Treat these computers name at 8.
So here I referred to that name of these computers named at a here as you can see we have this at de-listed
as you can see in line 23.
I actually declared this at least and its name is computerless name here.
And this at least is going to actually accept values that are of type strange and inside this uncreate
method here as you can see I am actually instantiating these computers name at a here.
OK.
And here as you can see I have this if statement and in say this if statement I created a for loop in
order to actually get the values from the skill light as you can see here.
And then we are actually assigning those values to string values to this computer's name.
And if we have actually objects if we have computed objects inside our schools.
OK.
Inside is uncreate me.
I actually added these lines of code here.
But when the user clicks on these add button I want to actually add this computer object here as you
can see.
I want to add this computer object into the database.
And I want to actually get us think rather you kept the computer name and the computer name.
These are actually string values right.
I want to get these values and assigned him to these computers named Ari.
OK.
So then they use it for example or clicks and this at button on a computer object is going to be created
and.
And the computer name and the computer type as you can see here are going to be added to the computer's
name address here.
So these values are going to be a string value as you can see I am actually adding these values together.
I am actually concatenating the value of this a computer name with disvalue computer type.
And we have a dash between these two values.
OK.
And here in 1995 after we added this computer object to the database and then we added this computed
object to our three.
At least he had as he can see.
I want to actually set the text of our editor The Artist field to.
Interesting value as you can see here and here I want to set the text of our computer type a computer
type to another OTTWAY actually an empty string value OK.
And here I fooled approach statement.
OK so now let's me actually pasting some lines of code here for this PTEN dealing here inside the city
in which case here I want to paste in some lines of code and then I'm gonna explain to you what's going
on here.