1
00:00:00,480 --> 00:00:06,870
Actually find the lay of Margene for this button and open this attribute by just clicking on this little

2
00:00:06,870 --> 00:00:11,620
triangle here and for the top assigned the value of 50.

3
00:00:12,420 --> 00:00:19,650
OK so now this actually selects these takes views and then delete the text of these takes use.

4
00:00:19,800 --> 00:00:21,260
OK.

5
00:00:22,890 --> 00:00:36,780
In this way it is more beautiful for an app and then selectees is here and another design for the user

6
00:00:36,780 --> 00:00:39,080
interface is actually finished.

7
00:00:39,330 --> 00:00:44,400
And now we can actually go back and say this main activity the java file here and here again deletes

8
00:00:44,410 --> 00:00:48,320
these lines of code that are actually related to the Options menu.

9
00:00:48,610 --> 00:00:52,630
And this block of code that is actually related to the connection button.

10
00:00:52,950 --> 00:00:55,420
And now we can actually put our own code here.

11
00:00:55,470 --> 00:00:56,270
OK.

12
00:00:56,790 --> 00:00:57,650
OK everyone.

13
00:00:57,660 --> 00:01:00,510
Now let's actually create some text view objects.

14
00:01:00,510 --> 00:01:00,980
OK.

15
00:01:01,170 --> 00:01:06,900
So just typing here text view OK takes the dice.

16
00:01:06,900 --> 00:01:10,880
Number one OK.

17
00:01:10,940 --> 00:01:18,980
Assignment operator and here we need to answer the cestus object to our Takes object find view ID are

18
00:01:19,130 --> 00:01:22,490
that ID that ticks the dose number one.

19
00:01:22,530 --> 00:01:23,430
OK.

20
00:01:23,450 --> 00:01:28,180
Again takes real takes the dice.

21
00:01:28,190 --> 00:01:28,880
Number two

22
00:01:32,880 --> 00:01:42,400
OK and here we need to cast this object to a text view object find by ID or that Id dot the dice.

23
00:01:42,480 --> 00:01:43,630
Number two.

24
00:01:43,860 --> 00:01:45,290
OK.

25
00:01:45,350 --> 00:01:49,850
Again takes few 360 days.

26
00:01:49,950 --> 00:01:50,670
Number three

27
00:01:53,360 --> 00:01:54,020
OK.

28
00:01:54,500 --> 00:02:02,660
And here we need to cast this object or text view object find view by id r that ID that takes the dice

29
00:02:02,750 --> 00:02:09,480
number three takes you to 60 dice.

30
00:02:09,510 --> 00:02:19,780
Number four OK and here we need to cast this object to this view object find view by id artist Id that

31
00:02:20,010 --> 00:02:21,730
60 days.

32
00:02:21,730 --> 00:02:22,740
Number four.

33
00:02:23,100 --> 00:02:23,750
OK.

34
00:02:24,040 --> 00:02:27,940
Again takes few takes the dice.

35
00:02:27,940 --> 00:02:32,440
Number five assignment operator.

36
00:02:32,470 --> 00:02:39,480
And then lets actually cast this object to a text view object find view by the or that Id dot 360 the

37
00:02:39,640 --> 00:02:45,830
number five takes you to fix the dice.

38
00:02:46,000 --> 00:02:46,930
Number six

39
00:02:49,510 --> 00:02:58,990
assignment operator takes you find you by ID are that ID that takes the dice.

40
00:02:58,990 --> 00:03:00,740
Number six.

41
00:03:00,740 --> 00:03:06,530
OK so now let's actually create a button object PTEN.

42
00:03:06,640 --> 00:03:09,170
Roll the dice.

43
00:03:10,170 --> 00:03:10,800
OK.

44
00:03:11,170 --> 00:03:20,830
And then essentially cast this object to our button object find view by id r that ID that BT and roll

45
00:03:20,830 --> 00:03:21,750
the dice.

46
00:03:22,080 --> 00:03:31,390
OK so now let's actually create a secure random object secure random OK and the name of this object

47
00:03:31,390 --> 00:03:33,460
is secure random numbers.

48
00:03:34,260 --> 00:03:35,120
OK.

49
00:03:35,620 --> 00:03:39,220
And now new secure random.

50
00:03:39,220 --> 00:03:39,830
OK.

51
00:03:40,180 --> 00:03:47,620
So we actually created an object of type secure random OK so that you can actually create a secure random

52
00:03:47,620 --> 00:03:48,450
numbers.

53
00:03:48,670 --> 00:03:49,000
OK.

54
00:03:49,000 --> 00:03:51,920
In order to use the application again.

55
00:03:51,970 --> 00:03:54,980
And now let's actually create an array.

56
00:03:55,000 --> 00:03:58,300
Int OK an array of integer numbers.

57
00:03:58,690 --> 00:04:03,580
And here we need to actually specify that we are going to ask you to create an array by putting a pair

58
00:04:03,580 --> 00:04:05,070
of black kids here.

59
00:04:05,620 --> 00:04:08,900
And the name of what I write is occurrence.

60
00:04:10,090 --> 00:04:11,010
OK.

61
00:04:11,530 --> 00:04:15,950
And then assignments operator new in.

62
00:04:16,840 --> 00:04:18,240
And here inside the brackets.

63
00:04:18,280 --> 00:04:21,370
I need to actually specify the size of my arii.

64
00:04:21,370 --> 00:04:31,320
So I just put the number 7 here and then here we can actually refer to the name of our button that set

65
00:04:31,400 --> 00:04:41,980
click listener new view on click listener and here inside of this ugly word we can actually put some

66
00:04:41,980 --> 00:04:42,700
codes.

67
00:04:42,970 --> 00:04:47,040
So now in say that this uncle even if it does actually create a for loop.

68
00:04:47,230 --> 00:04:47,780
OK.

69
00:04:48,070 --> 00:04:53,980
So now inside of Apprentice's Let's actually create a variable of type integer and the name of our variable

70
00:04:53,980 --> 00:04:57,070
is times assignment operator 0.

71
00:04:57,280 --> 00:04:58,050
OK.

72
00:04:58,550 --> 00:05:10,220
And now I need to specify a condition here times less than 5 million times and times plus plus.

73
00:05:10,690 --> 00:05:11,190
OK.

74
00:05:11,350 --> 00:05:15,660
And then I need to you to open and close this for loop by using these curly braces.

75
00:05:15,700 --> 00:05:21,640
So as you can see here I created a valuable here of type integer and the name of this variable is times

76
00:05:22,060 --> 00:05:24,520
and I assigned the value zero to this variable.

77
00:05:24,520 --> 00:05:26,580
And here I actually created a condition.

78
00:05:26,800 --> 00:05:33,350
And in this and here I am saying that this loop is going to be executed five million times.

79
00:05:33,370 --> 00:05:35,570
Ok onto the value of these times.

80
00:05:35,570 --> 00:05:39,420
Valuable is less than the value of five millions.

81
00:05:39,430 --> 00:05:43,580
So as you can see here because the value of these times variable is zero.

82
00:05:43,720 --> 00:05:46,480
This loop is going to be executed five million times.

83
00:05:46,480 --> 00:05:47,060
OK.

84
00:05:47,350 --> 00:05:54,510
And here I am saying that after each execution of this for loop increment the value of these times are

85
00:05:55,000 --> 00:05:56,210
valuable by one.

86
00:05:56,290 --> 00:05:57,130
OK.

87
00:05:57,550 --> 00:06:03,060
So inside of this for loop Let's actually create another integer right here built in.

88
00:06:03,430 --> 00:06:07,220
And the name of this variable is rant number.

89
00:06:07,590 --> 00:06:09,600
OK random number assignments.

90
00:06:09,610 --> 00:06:10,330
Operator.

91
00:06:10,600 --> 00:06:15,690
And then here I want to actually create a random number between number 1 and number 6.

92
00:06:15,700 --> 00:06:18,680
So here I can actually use this SECU random numbers object.

93
00:06:18,700 --> 00:06:19,660
OK.

94
00:06:19,660 --> 00:06:21,880
So secure random numbers.

95
00:06:22,250 --> 00:06:22,770
OK.

96
00:06:23,050 --> 00:06:24,800
That's next.

97
00:06:24,810 --> 00:06:30,340
In an inside Apprentice's I can just put in the values 6 here.

98
00:06:30,470 --> 00:06:30,980
OK.

99
00:06:31,330 --> 00:06:36,820
And here in this way it's going to actually generate a random number between number zero and number

100
00:06:36,820 --> 00:06:37,380
six.

101
00:06:37,540 --> 00:06:44,380
But because you want to actually only generate a random number between number one and number six here

102
00:06:44,440 --> 00:06:47,850
I just need to put in number one plus this piece of code.

103
00:06:47,890 --> 00:06:48,790
OK.

104
00:06:49,270 --> 00:06:54,490
And here in this way it's going actually to generate a random number with between number 1 and number

105
00:06:54,490 --> 00:06:55,090
6.

106
00:06:55,090 --> 00:06:55,840
OK.

107
00:06:56,260 --> 00:06:57,590
So hopefully that makes sense.

108
00:06:57,640 --> 00:07:02,110
We can actually referred to the name of this Aure occurrence.

109
00:07:02,430 --> 00:07:03,210
OK.

110
00:07:03,220 --> 00:07:06,720
And inside the brackets I can't just put in this random number.

111
00:07:07,210 --> 00:07:07,600
OK.

112
00:07:07,660 --> 00:07:11,840
So as you can see here I actually fit into the name of this array.

113
00:07:12,000 --> 00:07:19,060
And here I am saying that occurrence some random number it can actually go inside of this array.

114
00:07:19,590 --> 00:07:26,050
And then it's going to actually give me a value that is inside of this index of this random index.

115
00:07:26,070 --> 00:07:26,480
OK.

116
00:07:26,520 --> 00:07:29,570
And here I want to actually do something to that value.

117
00:07:29,580 --> 00:07:33,260
I went right through the increment value and then get that value.

118
00:07:33,270 --> 00:07:33,770
OK.

119
00:07:34,020 --> 00:07:37,290
So here I just need to put in plus plus.

120
00:07:37,370 --> 00:07:42,590
OK so here what I'm saying is go inside of this occurrence.

121
00:07:42,750 --> 00:07:43,210
OK.

122
00:07:43,390 --> 00:07:49,370
And go inside of that value and get the value of this random index.

123
00:07:49,390 --> 00:07:49,720
OK.

124
00:07:49,720 --> 00:07:51,230
So remember but this is the index.

125
00:07:51,250 --> 00:07:51,820
OK.

126
00:07:52,120 --> 00:07:58,280
And it's going to give me the value of the index inside of that Aure OK.

127
00:07:58,660 --> 00:08:01,070
And it increment that valuable one.

128
00:08:01,320 --> 00:08:01,750
OK.

129
00:08:01,810 --> 00:08:03,480
And then returned that value to me.

130
00:08:03,490 --> 00:08:03,990
OK.

131
00:08:04,120 --> 00:08:05,830
So hopefully that makes sense.

132
00:08:05,890 --> 00:08:08,800
For example the value of this Ranum is what is not a number.

133
00:08:08,800 --> 00:08:09,230
Free.

134
00:08:09,280 --> 00:08:09,780
OK.

135
00:08:09,880 --> 00:08:13,010
That's number three is going to go inside of this Achillas.

136
00:08:13,040 --> 00:08:13,930
Ari OK.

137
00:08:14,230 --> 00:08:19,150
The value of this land now is for example number three and it's going to actually go inside of this

138
00:08:19,150 --> 00:08:20,500
occurrence.

139
00:08:20,740 --> 00:08:24,080
And then it's going to find the index number three inside of this.

140
00:08:24,100 --> 00:08:24,780
OK.

141
00:08:25,090 --> 00:08:30,940
And then it's going to increment the value that is inside of that index number three inside of this

142
00:08:31,120 --> 00:08:33,060
right by one.

143
00:08:33,430 --> 00:08:33,910
OK.

144
00:08:33,940 --> 00:08:39,300
So now let's actually create another full of here and here in say the apprentice's.

145
00:08:39,310 --> 00:08:45,030
Let's actually create a variable of type integer and the name of this value but is face number.

146
00:08:45,360 --> 00:08:45,860
OK.

147
00:08:46,030 --> 00:08:49,300
Assignment operator number one semi-colon.

148
00:08:49,640 --> 00:08:53,820
And here I need to actually create a condition face.

149
00:08:54,140 --> 00:08:54,690
OK.

150
00:08:54,700 --> 00:08:57,410
Less than occurrence of every dot.

151
00:08:57,440 --> 00:08:58,180
Lynn.

152
00:08:58,500 --> 00:08:59,180
OK.

153
00:08:59,470 --> 00:09:07,030
So this loop is going to be executed until the value of this face number is less than the value of the

154
00:09:07,030 --> 00:09:09,190
length of this occurrence.

155
00:09:09,260 --> 00:09:10,240
OK so here.

156
00:09:10,240 --> 00:09:14,090
Notice that I assigned the value 1 to the space not valuable.

157
00:09:14,120 --> 00:09:15,460
This is very important.

158
00:09:15,540 --> 00:09:22,160
And here I need to actually specify that after each execution of this loop or the value of the space

159
00:09:22,220 --> 00:09:24,660
and value bet is going to be incremented by 1.

160
00:09:24,820 --> 00:09:25,360
OK.

161
00:09:25,360 --> 00:09:31,210
So here I need to actually open and close this for loop by using these curly braces inside of these

162
00:09:31,210 --> 00:09:32,380
curly braces.

163
00:09:32,380 --> 00:09:36,150
I can't just create some if statements here OK.

164
00:09:36,340 --> 00:09:47,710
So here I can't just say if faced the value of this face now valuable is equal to number one then takes

165
00:09:47,710 --> 00:09:50,360
the Doce number one.

166
00:09:50,380 --> 00:09:51,940
That said text.

167
00:09:51,940 --> 00:09:52,490
OK.

168
00:09:52,720 --> 00:09:56,920
And here inside Apprentice's again it just refers to the name of this array.

169
00:09:57,430 --> 00:10:00,070
OK sup face now.

170
00:10:00,830 --> 00:10:01,290
OK.

171
00:10:01,390 --> 00:10:07,570
And here I need to actually convert this value to add string values so that I can actually out with

172
00:10:07,570 --> 00:10:08,810
this value to the screen.

