1
00:00:00,390 --> 00:00:08,040
OK everyone now inside this main activity class class actually creates an object from the secure random

2
00:00:08,040 --> 00:00:08,370
class.

3
00:00:08,370 --> 00:00:08,920
OK.

4
00:00:09,180 --> 00:00:13,480
So first of all I need to actually refer to the name of this Eheu random class.

5
00:00:13,760 --> 00:00:14,490
OK.

6
00:00:14,790 --> 00:00:21,660
And then I need to actually give a name to this are secure random object to secure random numbers.

7
00:00:21,800 --> 00:00:22,320
OK.

8
00:00:22,530 --> 00:00:25,200
And then I need to put an assignment operator here.

9
00:00:25,430 --> 00:00:26,180
New.

10
00:00:26,450 --> 00:00:26,930
OK.

11
00:00:27,030 --> 00:00:30,020
Secure random class OK.

12
00:00:30,270 --> 00:00:36,810
So as you can see here we created an object from this secure random class and then we actually gave

13
00:00:36,870 --> 00:00:38,470
a name to this object.

14
00:00:38,490 --> 00:00:45,140
Secure random numbers and then we initialize this object to keep by using this new keyword.

15
00:00:45,540 --> 00:00:52,220
So now let's actually create our six integer value get into number one.

16
00:00:52,660 --> 00:00:53,050
OK.

17
00:00:53,100 --> 00:00:55,980
Assignment operator number zero.

18
00:00:55,980 --> 00:01:02,370
Int number two assignments assignment operator and then I assigned a value 0 to this variable.

19
00:01:02,450 --> 00:01:05,170
And number.

20
00:01:05,440 --> 00:01:08,940
Free assignment operator number 0.

21
00:01:09,150 --> 00:01:15,620
Int number for assignment operator number 0 int number

22
00:01:18,300 --> 00:01:19,320
5.

23
00:01:19,430 --> 00:01:25,270
Assignment operator number 0 and int number 6.

24
00:01:25,370 --> 00:01:27,550
Assignment operator number 0.

25
00:01:27,600 --> 00:01:33,250
OK so now let's actually go inside these uncreate Mefford.

26
00:01:33,290 --> 00:01:34,190
OK everyone.

27
00:01:34,250 --> 00:01:39,300
Now lets actually create some other objects inside this and method.

28
00:01:39,320 --> 00:01:47,470
Let's actually create a test object takes a few t XTi number one assignment operator and then I need

29
00:01:47,470 --> 00:01:55,740
to actually test this object to a text view object find view by ID are that already that is the number

30
00:01:55,760 --> 00:01:56,230
one.

31
00:01:56,350 --> 00:02:06,800
OK again it's actually create another text view object X the number 2 assignment operator and then I

32
00:02:06,800 --> 00:02:14,750
need to actually cast this object to a text view object find view by id r are that Id dot ticks the

33
00:02:14,960 --> 00:02:16,130
number two.

34
00:02:16,580 --> 00:02:21,360
OK takes few t s t number.

35
00:02:21,440 --> 00:02:24,060
Free assignment operator.

36
00:02:24,080 --> 00:02:34,430
I need to actually address this object to a text object find view by ID or that Id dot the number free

37
00:02:34,870 --> 00:02:36,510
ok again.

38
00:02:36,620 --> 00:02:44,600
Let's actually create another text object to use the numbers for the assignment operator.

39
00:02:44,600 --> 00:02:52,880
So now let's actually cast this object to a text view object find view Id r that ID that takes the number

40
00:02:53,290 --> 00:02:58,190
4 and then lets actually create another text view object.

41
00:02:58,350 --> 00:03:07,170
Th the number 5 assignment operator and then essentially cast this object to a text view object find

42
00:03:07,190 --> 00:03:13,040
view by id r that Id dot t t x the number 5.

43
00:03:13,230 --> 00:03:13,990
OK.

44
00:03:14,590 --> 00:03:22,670
And then I actually create another Tayseer object takes few ticks the number 6.

45
00:03:23,140 --> 00:03:33,970
Assignment operator takes few fine few ID or that ID that thinks the number 6.

46
00:03:33,970 --> 00:03:39,360
Ok so as you can see here we've got 5 6 different objects from this.

47
00:03:39,370 --> 00:03:40,940
R takes a class.

48
00:03:40,960 --> 00:03:44,240
So now let's actually create objects from the image view class.

49
00:03:44,440 --> 00:03:50,470
So just refer to the name of this image view class and let's actually hold the common key and then present

50
00:03:51,100 --> 00:03:52,670
this image view here.

51
00:03:52,690 --> 00:03:57,970
If you are using a Windows machine you need to actually hold the control key and then present this image

52
00:03:57,970 --> 00:03:58,480
view here.

53
00:03:58,480 --> 00:04:03,970
So just click on it and as you can see here this image viewer class is actually inheriting all of the

54
00:04:03,970 --> 00:04:07,690
features and behaviors that are inside this class.

55
00:04:07,890 --> 00:04:11,040
OK so hopefully that makes sense.

56
00:04:11,320 --> 00:04:14,810
And let's actually go back inside this main activity that you will find.

57
00:04:14,810 --> 00:04:20,610
And inside this uncreate Mfat that's actually create some objects from the image view class.

58
00:04:20,650 --> 00:04:23,150
So for the name of this object just type in here.

59
00:04:23,170 --> 00:04:30,970
I MGD dice OK and then put an assignment operator here and then inside the.

60
00:04:30,970 --> 00:04:40,500
We can just cast this object to our image view object find view by id art that Id dot are UMG dice.

61
00:04:41,140 --> 00:04:48,100
OK and then let's actually create another image view object image view.

62
00:04:49,020 --> 00:04:51,000
OK I m g.

63
00:04:51,490 --> 00:04:52,590
Dice.

64
00:04:52,930 --> 00:04:54,340
Number 1.

65
00:04:54,850 --> 00:04:56,200
Assignment operator.

66
00:04:56,410 --> 00:05:06,100
And then I need to cestus object or image object and find view by id r that ID that r m g is number

67
00:05:06,100 --> 00:05:16,240
one and then lets actually create another image view of object image view I m g dies on Nahm number

68
00:05:17,390 --> 00:05:18,210
2.

69
00:05:18,550 --> 00:05:23,430
Ok assignments operator and then we cast this object to an image object.

70
00:05:23,680 --> 00:05:33,100
Find view by id r that Id dot m g dice number free number 2.

71
00:05:33,580 --> 00:05:38,510
OK and then we need to actually put a semicolon at the end of our statement.

72
00:05:38,560 --> 00:05:47,650
So let's actually create another image view object image view our UMG dice number free assignments operator

73
00:05:48,190 --> 00:05:57,240
and here I need to cast this object to our 20 mystery object find view by id r that ID that r r m g.

74
00:05:57,400 --> 00:06:00,110
Number three J.

75
00:06:00,260 --> 00:06:04,680
So now let's actually create another object from this image view class.

76
00:06:04,770 --> 00:06:06,260
So Image view.

77
00:06:06,970 --> 00:06:07,710
OK.

78
00:06:07,930 --> 00:06:14,170
Our AMG dice number for assignment operator.

79
00:06:14,180 --> 00:06:22,510
And then let's actually cast this object to an image view object find you by ID are that Id dot or M

80
00:06:22,510 --> 00:06:22,860
G.

81
00:06:22,940 --> 00:06:24,990
Number four.

82
00:06:25,120 --> 00:06:26,040
OK.

83
00:06:26,420 --> 00:06:28,260
I am Judo's number four.

84
00:06:28,850 --> 00:06:32,280
So let's actually create another image view object.

85
00:06:32,300 --> 00:06:37,640
I m g dice number 5.

86
00:06:37,850 --> 00:06:45,560
Assignment operator and then the second actually has this object to an image object find view by id

87
00:06:45,650 --> 00:06:54,020
r that ID that I m g dice number five.

88
00:06:54,760 --> 00:06:55,490
OK.

89
00:06:55,820 --> 00:06:59,570
Again let's actually create another image view object image view.

90
00:07:00,110 --> 00:07:02,130
I m g dice.

91
00:07:02,510 --> 00:07:06,540
Number Number 6.

92
00:07:06,620 --> 00:07:13,220
Assignment operator and then let's actually cast this object to an image view object find view by ID

93
00:07:13,290 --> 00:07:19,520
or that ID that I m g d is number 6.

94
00:07:19,550 --> 00:07:20,190
OK.

95
00:07:21,490 --> 00:07:29,840
So now let's actually create an about an object by 10 billion roll dice and then let's actually put

96
00:07:29,930 --> 00:07:36,320
an assignment operator here and then we need to actually cast this object to about an object.

97
00:07:36,860 --> 00:07:37,590
OK.

98
00:07:37,730 --> 00:07:43,580
Find view by id the thought Id thought PTEN roll the dice.

99
00:07:43,580 --> 00:07:44,180
OK.

100
00:07:44,390 --> 00:07:51,380
Now let's actually make this Spartan Alina a listener to the clique's that the user make on the spot.

101
00:07:51,440 --> 00:07:52,510
Roll the dice.

102
00:07:52,520 --> 00:07:58,860
So let's actually refers to the name of this button here and roll the dice that set or click listener.

103
00:07:59,300 --> 00:07:59,750
OK.

104
00:07:59,790 --> 00:08:03,310
Now you view that on click listen.

105
00:08:03,320 --> 00:08:04,430
OK.

106
00:08:04,610 --> 00:08:08,530
So inside is unclear if they can actually put our own quotes.

107
00:08:08,690 --> 00:08:09,460
OK everyone.

108
00:08:09,470 --> 00:08:13,910
Now let's actually create a for loop inside this and click method.

109
00:08:13,910 --> 00:08:20,420
So here inside the apprentice's first of all it's actually create a valuable int and the name of this

110
00:08:20,420 --> 00:08:24,310
variable here is rule times.

111
00:08:24,580 --> 00:08:25,140
OK.

112
00:08:25,190 --> 00:08:27,030
Assignment operator zero.

113
00:08:27,680 --> 00:08:30,650
And then I need to refer to the name of this variable.

114
00:08:30,650 --> 00:08:36,500
Roll times are less than or equal to a number 5 million.

115
00:08:36,980 --> 00:08:38,020
OK.

116
00:08:38,790 --> 00:08:42,740
OK semicolon and then roll times plus plus.

117
00:08:42,820 --> 00:08:43,500
OK.

118
00:08:43,610 --> 00:08:49,010
And then I need to actually open and close this loop by using these curly braces.

119
00:08:49,010 --> 00:08:51,500
And then inside the loop.

120
00:08:51,740 --> 00:08:57,670
Actually create a variable int face number.

121
00:08:58,820 --> 00:08:59,520
OK.

122
00:08:59,780 --> 00:09:03,560
And then I need to actually put in an assignment operator here.

123
00:09:03,560 --> 00:09:11,370
Secure secure random numbers as you can see this object is our object here.

124
00:09:11,420 --> 00:09:19,510
We created this object here inside this main activity class in line 16 and here inside this method.

125
00:09:19,520 --> 00:09:27,230
And inside this for loop I am referring to the name to the name of this object dot next in it and then

126
00:09:27,230 --> 00:09:31,740
inside Apprentice's I can just put in Number 6 here.

127
00:09:32,030 --> 00:09:42,410
OK so as you can see here here I am saying that gave me an integer number between a number 0 to number

128
00:09:42,410 --> 00:09:43,270
6.

129
00:09:43,570 --> 00:09:44,100
OK.

130
00:09:44,330 --> 00:09:51,340
So if you want to get a value between one number of 1 to number 6 I need to actually put in number one

131
00:09:51,350 --> 00:09:54,260
here plus this piece of code here.

132
00:09:54,320 --> 00:09:54,740
OK.

133
00:09:54,800 --> 00:09:58,120
So one plus secure random number is that next in 6.

134
00:09:58,130 --> 00:10:03,000
So this piece of code is going to actually give me a random number between these two numbers.

135
00:10:03,020 --> 00:10:03,630
OK.

136
00:10:04,040 --> 00:10:07,760
So now let's actually create a switch statement which.

