1
00:00:00,260 --> 00:00:05,790
Hire everyone in this tutorial we are going to go ahead and create another Android application.

2
00:00:05,790 --> 00:00:06,760
So just click on this.

3
00:00:06,780 --> 00:00:14,100
Start in your Android studio project here and here for the application name just type in here app 23

4
00:00:14,730 --> 00:00:23,030
and then click on next and here choose API 16 Android 4.1 Jelly Bean for a minimum STK next.

5
00:00:23,580 --> 00:00:26,970
And here choose our Blache activity next.

6
00:00:27,120 --> 00:00:28,560
And then actually kind of finish.

7
00:00:28,560 --> 00:00:35,100
Now let's actually select this hellova of the takes here and then press on delete key on your keyboard.

8
00:00:35,100 --> 00:00:37,640
Now double click on these arrays folder here.

9
00:00:37,860 --> 00:00:44,160
Lay out activity underline made that example and then select this floating action button here and then

10
00:00:44,610 --> 00:00:46,450
press on the real key on your keyboard.

11
00:00:46,470 --> 00:00:46,950
OK.

12
00:00:47,280 --> 00:00:50,840
So now let's actually go back inside this content underline minute example.

13
00:00:51,000 --> 00:00:55,500
And here we want to actually design the user interface of our application.

14
00:00:55,500 --> 00:00:56,020
OK.

15
00:00:56,200 --> 00:01:03,340
OK so now let's actually drag linearly out vertical at the center of these relatively out here.

16
00:01:03,420 --> 00:01:04,050
OK.

17
00:01:04,330 --> 00:01:08,300
And now let's actually find the scroll view here.

18
00:01:08,320 --> 00:01:16,050
Hold it actually we need to drag our vertical scroll view into these linear linear.

19
00:01:16,200 --> 00:01:19,380
Lay out your vertical as you can see here.

20
00:01:19,380 --> 00:01:23,130
And then we need to actually put in a linearly vertical.

21
00:01:23,210 --> 00:01:29,960
Inside this scroll view here as you know this scroll you can only accept one direct choice.

22
00:01:30,000 --> 00:01:30,750
OK.

23
00:01:30,990 --> 00:01:37,040
So we actually put these linearly vertical inside this scroll view here.

24
00:01:37,050 --> 00:01:37,820
OK.

25
00:01:38,280 --> 00:01:46,160
And now let's actually drag up takes few large takes you into these linearly outwards to call here.

26
00:01:46,380 --> 00:01:47,030
OK.

27
00:01:47,160 --> 00:01:49,780
And double click and this takes you here.

28
00:01:50,220 --> 00:01:54,990
And for the text just typing here the name of the game is.

29
00:01:54,990 --> 00:02:01,190
So as you can see here I just actually wrote here the name of the game is colon.

30
00:02:01,280 --> 00:02:01,800
OK.

31
00:02:01,890 --> 00:02:04,260
And then present Enter key on your keyboard.

32
00:02:04,260 --> 00:02:10,470
So now let's actually try another large text view into this linearly alphabetical vertical here and

33
00:02:10,470 --> 00:02:15,140
double click on these text view here and delete the text of this text view.

34
00:02:15,150 --> 00:02:19,110
And for the ID just type in here TXI the game name.

35
00:02:19,110 --> 00:02:20,070
OK.

36
00:02:20,730 --> 00:02:22,860
And then present Enter key on your keyboard.

37
00:02:23,160 --> 00:02:24,050
That's actually right.

38
00:02:24,070 --> 00:02:27,850
Another large text view into this linearly aesthetical here.

39
00:02:28,050 --> 00:02:34,890
And this time double click and this takes you and for the text just typing here this course of the game

40
00:02:35,040 --> 00:02:37,160
are colon OK.

41
00:02:37,410 --> 00:02:43,740
So as you can see here I wrote here this course of the game are OK and then press Enter key on your

42
00:02:43,740 --> 00:02:44,600
keyboard.

43
00:02:45,000 --> 00:02:51,670
So now it's actually right and other large text view into this linearly or two article here and WDTN

44
00:02:51,750 --> 00:02:59,850
the sticks you hear delete the text of this text view and for the ID just a in here takes the game scores.

45
00:02:59,910 --> 00:03:01,270
OK.

46
00:03:02,250 --> 00:03:05,000
And then press that enter key on your keyboard.

47
00:03:05,010 --> 00:03:10,800
So now let's actually track and other large takes you into this linearly Altschuler equal here.

48
00:03:10,950 --> 00:03:11,410
OK.

49
00:03:11,520 --> 00:03:14,050
And then double click and these are text view here.

50
00:03:14,280 --> 00:03:14,830
OK.

51
00:03:15,030 --> 00:03:19,020
And for the text of this text view just type in here.

52
00:03:19,200 --> 00:03:22,430
The lowest score of the game is colon.

53
00:03:22,620 --> 00:03:23,160
OK.

54
00:03:23,310 --> 00:03:28,080
So as you can see here are you right here the lowest score of the game is called in.

55
00:03:28,080 --> 00:03:28,340
OK.

56
00:03:28,350 --> 00:03:33,930
And then present Enter key on your keyboard and then let's actually right and other large takes you

57
00:03:34,260 --> 00:03:39,620
into this linearly elsewheres equal here and WDTN the state's view here.

58
00:03:39,660 --> 00:03:45,830
Deleted the text of the stakes for you and for the ID just in here takes the game lowest score.

59
00:03:45,840 --> 00:03:46,890
OK.

60
00:03:48,330 --> 00:03:50,660
And then present Enter key on your keyboard.

61
00:03:50,940 --> 00:03:55,860
Now let's actually decide on another large this view into this linearly 20 call.

62
00:03:56,280 --> 00:03:57,620
Double click on it.

63
00:03:57,630 --> 00:04:10,590
And for the text just taken here the highest score of the game is ok colon and then a person into here

64
00:04:10,600 --> 00:04:17,530
on your keyboard Let's actually write another large view into this linearly alphabetical here and double

65
00:04:17,530 --> 00:04:25,660
click on it and delete the text of this text view and for the ID just taken here takes the game highest

66
00:04:25,670 --> 00:04:31,780
score OK score and then press on and Turkey on your keyboard.

67
00:04:31,790 --> 00:04:40,360
OK so now let's actually try and order a large text view into this linearly or vertical here and double

68
00:04:40,360 --> 00:04:41,950
click and this takes you here.

69
00:04:42,070 --> 00:04:42,680
OK.

70
00:04:43,150 --> 00:04:50,380
And then just type in here the average value of this calls is colon and then our person and the key

71
00:04:50,380 --> 00:04:51,400
on your keyboard.

72
00:04:51,400 --> 00:04:58,020
Now let's actually track a larger text view into these linearly alphabetical here and double clicking

73
00:04:58,020 --> 00:04:58,760
on it.

74
00:04:58,930 --> 00:05:04,660
Is the text of this text for you and for the idea just typing here takes the game average takes the

75
00:05:04,660 --> 00:05:10,500
game average value of scores.

76
00:05:10,620 --> 00:05:11,690
OK.

77
00:05:12,550 --> 00:05:15,550
And then press Enter key on your keyboard.

78
00:05:15,550 --> 00:05:19,240
So now the design of our user interface is actually finished.

79
00:05:19,240 --> 00:05:24,910
Now let's actually go back inside this main activity or job of file here delete these lines of code

80
00:05:24,940 --> 00:05:28,350
that are actually related to the Options menu here.

81
00:05:28,390 --> 00:05:28,880
OK.

82
00:05:29,060 --> 00:05:34,200
And then delete this block of code that is actually related to the floating action button.

83
00:05:34,540 --> 00:05:36,780
And now we can actually put in our own code here.

84
00:05:36,820 --> 00:05:37,480
OK.

85
00:05:37,810 --> 00:05:41,290
So first of all we need to actually create a Java class.

86
00:05:41,350 --> 00:05:45,440
So just click on File Neo and then click on Java class.

87
00:05:45,460 --> 00:05:46,210
OK.

88
00:05:46,600 --> 00:05:52,180
And for the class name just type in here again and then click on OK here.

89
00:05:52,180 --> 00:05:54,500
So as you can see here this is our game class.

90
00:05:54,550 --> 00:05:55,010
OK.

91
00:05:55,120 --> 00:05:58,730
And then we can actually put our own codes inside of this game class.

92
00:05:58,770 --> 00:06:03,200
OK so now let's actually create our two instance variables.

93
00:06:03,250 --> 00:06:04,110
OK.

94
00:06:04,870 --> 00:06:08,400
As you can see here these are my two instance variables.

95
00:06:08,710 --> 00:06:14,400
And as you can see the access modifier of these instance variables is actually private.

96
00:06:14,770 --> 00:06:21,230
And the other type of this instance but is strange and the name of this instance variable is actually

97
00:06:21,230 --> 00:06:22,260
a game name OK.

98
00:06:22,390 --> 00:06:26,910
And as you can see here I didn't instantiate this instance variable here.

99
00:06:26,930 --> 00:06:29,780
OK I just declared this instance variable.

100
00:06:29,950 --> 00:06:35,110
And here again as you can see the data type of this instance variable is integer.

101
00:06:35,290 --> 00:06:39,120
And here I just want to actually create a two dimensional array.

102
00:06:39,280 --> 00:06:44,200
OK so I just put in two pair of brackets here as you can see here.

103
00:06:44,410 --> 00:06:47,650
And then the name of this instance variable is is score's.

104
00:06:47,650 --> 00:06:48,110
OK.

105
00:06:48,250 --> 00:06:53,020
So as you can see here again I didn't instantiate this instance variable here.

106
00:06:53,170 --> 00:06:53,610
OK.

107
00:06:53,680 --> 00:07:00,460
Now let's actually create a constructor and then instantiate this instance variables inside of that

108
00:07:00,460 --> 00:07:01,620
constructor OK.

109
00:07:01,870 --> 00:07:08,220
So as you can see here this is my constructor and the access modifier of the of my constructor is public.

110
00:07:08,320 --> 00:07:13,720
The name of my constructor is gain as you can see here the name of the constructor must be the same

111
00:07:13,990 --> 00:07:15,820
as the name of the class name.

112
00:07:15,820 --> 00:07:16,340
OK.

113
00:07:16,600 --> 00:07:19,290
And this constructor actually accepts two arguments.

114
00:07:19,320 --> 00:07:25,750
Ok the first argument as you can see here the type of the first argument is strange the name of my first

115
00:07:25,750 --> 00:07:27,550
argument is game name.

116
00:07:27,550 --> 00:07:33,580
And again the type of my second argument as you can see is integer a two dimensional array of integers

117
00:07:33,730 --> 00:07:34,670
as you can see here.

118
00:07:34,870 --> 00:07:41,260
And the name of my argument as you can see here is score's as you can see this name is the same as the

119
00:07:41,260 --> 00:07:43,470
name of this instance variable.

120
00:07:43,480 --> 00:07:44,050
OK.

121
00:07:44,260 --> 00:07:51,040
So inside of this constructor as you can see here I actually instantiated these instance variables these.

122
00:07:51,130 --> 00:07:57,430
So as you know this keyboard as you can see here is actually referring to an object that is actually

123
00:07:57,430 --> 00:08:03,680
created from this game class for example if you actually create an object from the game class inside

124
00:08:03,700 --> 00:08:09,910
of this main activity that java file then this keyword here refers to that object.

125
00:08:09,910 --> 00:08:10,400
OK.

126
00:08:10,660 --> 00:08:16,260
And this name actually refers to this game an instance variable assignment operator.

127
00:08:16,270 --> 00:08:21,920
And here I am actually referring to this game name instance variable as you can do this.

128
00:08:21,920 --> 00:08:27,430
Our game name our argument as you can see this game is actually fit into this argument.

129
00:08:27,460 --> 00:08:30,860
And this game name is actually referring to this instance variable.

130
00:08:30,860 --> 00:08:31,430
OK.

131
00:08:31,780 --> 00:08:39,070
So in order because of the name of this instance variable is the same as the name of this argument here

132
00:08:39,070 --> 00:08:45,130
we need we actually need it to refer to this game an instance variable.

133
00:08:45,130 --> 00:08:47,900
By preceding its name by this key word.

134
00:08:48,010 --> 00:08:48,590
OK.

135
00:08:48,760 --> 00:08:50,470
So this dart game name.

136
00:08:50,470 --> 00:08:56,010
Actually the first to this instance variable and this game actually refers to this argument.

137
00:08:56,020 --> 00:08:56,540
OK.

138
00:08:56,620 --> 00:09:00,880
And here we are assigning this argument to this instance variable.

139
00:09:00,880 --> 00:09:06,480
Actually we are instantiating this instance variable here and here again this is this.

140
00:09:06,580 --> 00:09:11,920
It's the same story we are referring to this is called this instance variable by presidium it's named

141
00:09:11,920 --> 00:09:13,390
by this key vote.

142
00:09:13,540 --> 00:09:19,690
And here you are assigning these scores argument to this instance variable here.

143
00:09:19,810 --> 00:09:20,800
OK.

144
00:09:21,520 --> 00:09:23,350
So hopefully that makes sense.

145
00:09:23,650 --> 00:09:28,670
And now let's actually putting some lines of code here after the constructor here.

146
00:09:28,720 --> 00:09:35,140
So here let's actually create our set here and I'll get here for this game name instance variable here

147
00:09:35,170 --> 00:09:36,050
as you can see.

148
00:09:36,400 --> 00:09:40,490
So here as you can see here this is my upset game named Mefford.

149
00:09:40,550 --> 00:09:43,850
OK this is a setter for this game named instance variable.

150
00:09:44,050 --> 00:09:50,140
And this method actually accepts an argument of types 3 in the name of this argument is game name.

151
00:09:50,140 --> 00:09:55,510
And here again I am actually assigning the value of this argument to this instance variable.

152
00:09:55,510 --> 00:09:58,160
It is that game name assignment operator gave me.

153
00:09:58,260 --> 00:10:04,550
Ok and now let's actually create a getter for this game an instance variable.

