Actually find the lay of Margene for this button and open this attribute by just clicking on this little
triangle here and for the top assigned the value of 50.
OK so now this actually selects these takes views and then delete the text of these takes use.
OK.
In this way it is more beautiful for an app and then selectees is here and another design for the user
interface is actually finished.
And now we can actually go back and say this main activity the java file here and here again deletes
these lines of code that are actually related to the Options menu.
And this block of code that is actually related to the connection button.
And now we can actually put our own code here.
OK.
OK everyone.
Now let's actually create some text view objects.
OK.
So just typing here text view OK takes the dice.
Number one OK.
Assignment operator and here we need to answer the cestus object to our Takes object find view ID are
that ID that ticks the dose number one.
OK.
Again takes real takes the dice.
Number two
OK and here we need to cast this object to a text view object find by ID or that Id dot the dice.
Number two.
OK.
Again takes few 360 days.
Number three
OK.
And here we need to cast this object or text view object find view by id r that ID that takes the dice
number three takes you to 60 dice.
Number four OK and here we need to cast this object to this view object find view by id artist Id that
60 days.
Number four.
OK.
Again takes few takes the dice.
Number five assignment operator.
And then lets actually cast this object to a text view object find view by the or that Id dot 360 the
number five takes you to fix the dice.
Number six
assignment operator takes you find you by ID are that ID that takes the dice.
Number six.
OK so now let's actually create a button object PTEN.
Roll the dice.
OK.
And then essentially cast this object to our button object find view by id r that ID that BT and roll
the dice.
OK so now let's actually create a secure random object secure random OK and the name of this object
is secure random numbers.
OK.
And now new secure random.
OK.
So we actually created an object of type secure random OK so that you can actually create a secure random
numbers.
OK.
In order to use the application again.
And now let's actually create an array.
Int OK an array of integer numbers.
And here we need to actually specify that we are going to ask you to create an array by putting a pair
of black kids here.
And the name of what I write is occurrence.
OK.
And then assignments operator new in.
And here inside the brackets.
I need to actually specify the size of my arii.
So I just put the number 7 here and then here we can actually refer to the name of our button that set
click listener new view on click listener and here inside of this ugly word we can actually put some
codes.
So now in say that this uncle even if it does actually create a for loop.
OK.
So now inside of Apprentice's Let's actually create a variable of type integer and the name of our variable
is times assignment operator 0.
OK.
And now I need to specify a condition here times less than 5 million times and times plus plus.
OK.
And then I need to you to open and close this for loop by using these curly braces.
So as you can see here I created a valuable here of type integer and the name of this variable is times
and I assigned the value zero to this variable.
And here I actually created a condition.
And in this and here I am saying that this loop is going to be executed five million times.
Ok onto the value of these times.
Valuable is less than the value of five millions.
So as you can see here because the value of these times variable is zero.
This loop is going to be executed five million times.
OK.
And here I am saying that after each execution of this for loop increment the value of these times are
valuable by one.
OK.
So inside of this for loop Let's actually create another integer right here built in.
And the name of this variable is rant number.
OK random number assignments.
Operator.
And then here I want to actually create a random number between number 1 and number 6.
So here I can actually use this SECU random numbers object.
OK.
So secure random numbers.
OK.
That's next.
In an inside Apprentice's I can just put in the values 6 here.
OK.
And here in this way it's going to actually generate a random number between number zero and number
six.
But because you want to actually only generate a random number between number one and number six here
I just need to put in number one plus this piece of code.
OK.
And here in this way it's going actually to generate a random number with between number 1 and number
6.
OK.
So hopefully that makes sense.
We can actually referred to the name of this Aure occurrence.
OK.
And inside the brackets I can't just put in this random number.
OK.
So as you can see here I actually fit into the name of this array.
And here I am saying that occurrence some random number it can actually go inside of this array.
And then it's going to actually give me a value that is inside of this index of this random index.
OK.
And here I want to actually do something to that value.
I went right through the increment value and then get that value.
OK.
So here I just need to put in plus plus.
OK so here what I'm saying is go inside of this occurrence.
OK.
And go inside of that value and get the value of this random index.
OK.
So remember but this is the index.
OK.
And it's going to give me the value of the index inside of that Aure OK.
And it increment that valuable one.
OK.
And then returned that value to me.
OK.
So hopefully that makes sense.
For example the value of this Ranum is what is not a number.
Free.
OK.
That's number three is going to go inside of this Achillas.
Ari OK.
The value of this land now is for example number three and it's going to actually go inside of this
occurrence.
And then it's going to find the index number three inside of this.
OK.
And then it's going to increment the value that is inside of that index number three inside of this
right by one.
OK.
So now let's actually create another full of here and here in say the apprentice's.
Let's actually create a variable of type integer and the name of this value but is face number.
OK.
Assignment operator number one semi-colon.
And here I need to actually create a condition face.
OK.
Less than occurrence of every dot.
Lynn.
OK.
So this loop is going to be executed until the value of this face number is less than the value of the
length of this occurrence.
OK so here.
Notice that I assigned the value 1 to the space not valuable.
This is very important.
And here I need to actually specify that after each execution of this loop or the value of the space
and value bet is going to be incremented by 1.
OK.
So here I need to actually open and close this for loop by using these curly braces inside of these
curly braces.
I can't just create some if statements here OK.
So here I can't just say if faced the value of this face now valuable is equal to number one then takes
the Doce number one.
That said text.
OK.
And here inside Apprentice's again it just refers to the name of this array.
OK sup face now.
OK.
And here I need to actually convert this value to add string values so that I can actually out with
this value to the screen.