So now inside of these practices of this company and device first of all we need to actually specify
the company name.
OK.
So now I actually paste a piece of code here and then I'll explain to you what's going on here.
So as you can see here this is the company's Arey OK.
Companies inside of the brackets I use specify that index divided by 12.
OK.
So first of all let me tell you that this array is going to be executed until the value of this index
variable here as you can see is less than the value of the line of this company and devices Adli.
OK.
So as you can see here the land of this company and devices array is Sixthly.
OK.
So as you can see here in line 24 where we actually instantiated this array we specified that the size
of this rate is 60 so that the value is the length of this Aure.
OK.
So now for example for the first time that this loop is going to be executed the value of the index
variable is zero.
Okay.
So here we wrote that company and devices sub index.
So the value of the index is zero.
And this means go inside of the index zero of this company and the basis.
Ari Okay.
And now you want to assign a value to that index of that arii.
OK.
So here we just putting the new keyboard here because we want to create some objects of type company
and device class and then we want to assign those objects to this area.
OK.
For example we want to create an object and then we want to assign that object to the index 0.
As you can see here to this area.
OK.
And here in say the practices of this company and devise a class we need to actually specify two arguments.
Ok for the constructor of this class because we are creating an object from this class OK.
So the first argument that we should provide for this constructor is that we need to actually specify
the name of the company.
OK so first of all I referred to the name of these companies here as you can see if we create we created
an array of strings here in line 20 and we assign somebody used to this.
OK.
One two three four five.
We assigned five string values to these at a and b refers to that area.
OK.
And inside the brackets of this Auret I specify that index divided by 12.
OK so the first then that this area is going to be executed the value of this index variable is 0 OK
so zero divided by 12.
So now that we actually opened the calculator app and then I'll show you the calculations that are actually
being performed in this application.
OK.
So as you can see here this is our calculator OK.
So for the first time that this loop is going to be executed the value of this index variable is zero.
OK.
And here inside the brackets of these companies are I to actually divide the value of this index variable.
It is right the number 12.
OK.
So number is 0 divided by number 12 is equal to number 0.
OK.
And then it's going to go inside of the company's array and then it's going to actually go inside of
the index number 0.
OK so as you can see this is the index number 0.
OK.
So remember in proclaiming We always count from number zero.
OK.
So this value of this Apple value is the value that is actually inside of the index zero of these companies.
OK.
So it's going to go inside of these companies are in and then it's going to actually give me this value
apple.
OK.
So this is the first arguments that we actually provided for this company and device constructor.
And the second argument that we should actually provide for this company and the base constructor is
that we need to specify the company device.
Okay.
So this is the company named Apple.
And now I need to actually specify the company device.
So these are the devices.
Okay.
So here I could just refer to the name of these devices are a devices.
And then I could just put in a pair of brackets and this time I want to just type in index.
OK.
Module number 12.
And then I need to actually put in a semicolon at the end of my statement this time I actually referred
to the name of these devices.
Because I want to actually specify the company device.
OK.
And then inside the brackets of these devices array I did a relatively something different.
I actually referred to the name of this index variable module number 12.
OK.
So for the first time that this loop is going to be executed the value of this index variable is zero
OK.
So numbers 0 module number 12.
OK.
Is equal to number 0 OK.
And then it's going to give me the value 0.
OK.
And then it's going to go inside of the index zero of these devices are a.
So the value of this of the index is zero of these devices is experience as it's free.
OK.
And then it's going to return that value to me experience it free and then it's going to actually assign
those values to the index zero of this company and devices at a.
OK.
And then it's going to actually execute this loop until the value of this index variable is actually
less than 60 OK.
Companies and devices that lend is 60.
So for example for the second time that this group is going to be executed the value of the index variable
is number one.
OK.
Because we just specified here that after each execution of this for loop increment the value of this
index valuable by 1.
So now the value of this index variable is number one.
Okay.
And then it's going to actually go inside of this for loop and then it's going to actually execute this
piece of code here.
So first of all we really failed to the name of this Arrey company and devices.
Okay.
And inside the brackets we specify the index of this Aure index.
So now that the value of this index variable is number one.
Now we want to actually assign a value to that specific index to the index number of one of these arii.
OK.
So here I want to actually create an object a new company and device and then first of all for the first
argument of the constructor of this class I need to specify the company name.
So first of all I referred to the name of these companies.
OK.
As you can see here index.
So now as you can see inside the brackets I just referred to the name of this index variable.
So the value of this index variable now is number one.
OK.
Divided by 12.
So number one divided by 12 is number one divided by 12 is number 0.
OK so remember because we are actually divided into two integer numbers it's going to only give us the
value 0 0.
It's going to actually keep this a decimal digits.
And then it's going to only give us the values the 0 because we are actually divided in number an integer
number by another integer number.
OK.
Index divided by 12 is 0.
OK so then it's going to actually go inside of the index zero of these companies Auret.
So the value that is inside of the index zero of these companies right is uphill.
As you can see this value.
And then again here we are actually specifying the company device here for the second argument and then
we go inside of the devices Aure as you can see this is the devices array and then the value of this
index value by now is number one.
So number one module number 12.
Okay.
As you can see number one module number 12 is number 1.
Okay.
And then it's going to go inside of these devices great and then it's going I try to go inside of the
index number of one of these arii.
So the value that is inside of the index number of one of these devices Aure is iPhone 6.
OK.
So then it's going to actually give me this iPhone 6 to me.
And then as you can see it is values the company name and and the company device is going to be assigned
to the index number one of this company and devices arey.
OK.
And for the first time that this is going to be executed again the value of this index value is going
to be incremented by Yvonne.
And now the value of that is inside of the index.
Valuable is actually the number two.
Here instead of the for loop as you can see.
And then it's going to actually check this condition here.
Number two is less than company and devices that lead.
So it is Trudy's condition evaluates to true and then it's going to go inside of this for loop.
And then again it's again it can actually execute this piece of code that is inside of this for a loop.
OK.
So first of all I referred to the name of this company and devices.
OK bracket's index.
So here are now the value of this index value is number two.
So it's going to go inside of the index number two of this array.
OK assignments.
Operator now you want to actually instead assign a value to the index number.
Two of these are.
OK.
A new Ok companion device and now we want to actually create an object from this company and device
class and I want to assign that object to this array through the index number two of that of this address.
OK.
Because we want to actually create an object from this company and device at the constructor of this
class is going to be called.
So if you need to actually specify to actually two values the arguments of this array.
OK we need to actually specify two arguments for this company and device constructor.
And for the first argument we need to specify the company name.
OK.
So as you can see I referred to the name of these companies arii.
OK.
And in brackets.
I just put in brackets here.
Index divided by 12.
Now that the value of this index variable is number 2 so 2 divided by 12 is again number 0.
OK.
So as you can see here because we are actually dividing two integer values together it can actually
only give us an integer number and it can actually skip the the decimal digits.
It's going to only give us an integer numbers divided by 12 is number 0.
OK.