1
00:00:03,890 --> 00:00:08,790
Now let's actually create another MFL card get the maximum value.

2
00:00:08,900 --> 00:00:09,430
OK.

3
00:00:09,620 --> 00:00:12,930
So just I just posted here as you can see this is our Meffert.

4
00:00:13,040 --> 00:00:13,430
OK.

5
00:00:13,430 --> 00:00:14,950
That they actually pasted here.

6
00:00:15,140 --> 00:00:21,240
And again the access modifier of this and if it is public the return type of this method is it.

7
00:00:21,410 --> 00:00:25,690
So this means that this Smurfit is going to ask you to return a value of type integer.

8
00:00:25,730 --> 00:00:26,240
OK.

9
00:00:26,570 --> 00:00:33,100
And the name of this method is get the maximum value and this method does not actually accept any arguments.

10
00:00:33,120 --> 00:00:39,890
Ok so now as you can see here inside of these Smurfette these are actually our implementations inside

11
00:00:39,920 --> 00:00:40,920
of this method.

12
00:00:41,210 --> 00:00:46,960
And here I actually created a variable of type integer highest score assignments operator.

13
00:00:47,150 --> 00:00:53,460
And here I am actually assuming that the value of that is actually the inside of the index zero of these

14
00:00:53,490 --> 00:00:57,900
scores array is actually the highest value as you can see here.

15
00:00:58,340 --> 00:01:01,310
And again I created another for a look here.

16
00:01:01,440 --> 00:01:03,720
Four in the score scores.

17
00:01:03,800 --> 00:01:10,400
If the value of this score value is greater than the value of this highest score as you can see here

18
00:01:10,850 --> 00:01:14,340
then highest score assignment operator scored.

19
00:01:14,340 --> 00:01:20,250
OK then we are actually assigning the value of the score to this highest score variable here.

20
00:01:20,270 --> 00:01:21,240
OK.

21
00:01:21,710 --> 00:01:26,770
And at the end you are actually returning the value of this highest score value.

22
00:01:26,780 --> 00:01:32,720
Ok and now let's actually create another method here.

23
00:01:33,080 --> 00:01:38,450
So as you can see here this is our Meffert get the average value here as you can see.

24
00:01:38,450 --> 00:01:42,000
So the access modifier of this method is public.

25
00:01:42,050 --> 00:01:42,880
OK.

26
00:01:42,890 --> 00:01:46,340
And the return type of this method is double.

27
00:01:46,490 --> 00:01:53,300
So this means that if it is going to actually return a value of type double and the name of this method

28
00:01:53,330 --> 00:01:55,340
is actually get the average value.

29
00:01:55,400 --> 00:01:55,980
OK.

30
00:01:56,160 --> 00:02:01,580
And inside of the Smurfit as you can see these these are actually our own implementations inside of

31
00:02:01,580 --> 00:02:02,240
this method.

32
00:02:02,420 --> 00:02:08,330
I created a variable of type actually the integer as you can see and the name of this variable is total

33
00:02:08,750 --> 00:02:13,200
and I assigned this number to zero to this valuable total.

34
00:02:13,280 --> 00:02:13,890
OK.

35
00:02:14,240 --> 00:02:20,310
And here I created a for loop ok and enhanced for loop for end score score.

36
00:02:20,360 --> 00:02:25,300
So it's going to either rate over that actually values that are actually inside of these scores.

37
00:02:25,780 --> 00:02:26,460
OK.

38
00:02:26,720 --> 00:02:33,620
And here inside of these for loop I am actually assigning the value of this score variable as you can

39
00:02:33,620 --> 00:02:36,900
see to this total of valuable here OK.

40
00:02:36,920 --> 00:02:41,630
So this line of code here is actually the same as this line of code that I am about to write.

41
00:02:41,630 --> 00:02:42,030
OK.

42
00:02:42,140 --> 00:02:48,620
So total assignment operator total plus score.

43
00:02:49,110 --> 00:02:50,300
OK.

44
00:02:50,630 --> 00:02:52,910
So hopefully that makes sense.

45
00:02:53,000 --> 00:02:56,170
And at the end we are actually returning a value OK.

46
00:02:56,180 --> 00:03:03,140
So first of all I am actually casting this value the value of this toward all valuable as you can see

47
00:03:03,140 --> 00:03:04,580
this value is of type integer.

48
00:03:04,580 --> 00:03:05,110
OK.

49
00:03:05,360 --> 00:03:08,850
And we need to actually return a value of type double.

50
00:03:08,990 --> 00:03:14,560
So here I am actually casting this value to a double value here.

51
00:03:14,690 --> 00:03:21,510
As you can see and I am actually dividing that value as you can see here by the value of the length

52
00:03:22,190 --> 00:03:24,130
of these Arey scores at it.

53
00:03:24,140 --> 00:03:29,650
OK so now it's actually create another Meffert here.

54
00:03:32,460 --> 00:03:37,740
Now let's actually create another method here inside of this sport class.

55
00:03:38,160 --> 00:03:41,720
So as you can see here this is our Mefford as you can see here.

56
00:03:41,730 --> 00:03:42,700
I'll paste it here.

57
00:03:42,810 --> 00:03:43,410
OK.

58
00:03:43,830 --> 00:03:47,760
And the access modifier of this method is public.

59
00:03:47,910 --> 00:03:54,750
The return type of this method is void and the name of this method is let's output this calls.

60
00:03:54,770 --> 00:03:55,330
OK.

61
00:03:55,650 --> 00:04:01,610
And this Smurfette this time is going to actually accept an argument of type of text view.

62
00:04:01,620 --> 00:04:02,500
OK.

63
00:04:02,820 --> 00:04:09,310
So as you can see here inside of the Smurfette I created I actually declared a variable of types 3 and

64
00:04:09,420 --> 00:04:15,090
as you can see in line 79 and the name of this valuable is all it takes for you.

65
00:04:15,270 --> 00:04:15,930
OK.

66
00:04:16,320 --> 00:04:22,540
And here I actually created a for loop here as you can see an inside of the practices of this for loop.

67
00:04:22,620 --> 00:04:29,680
First of all I created a variable of type integer and the name of this variable is index.

68
00:04:29,700 --> 00:04:30,350
OK.

69
00:04:30,450 --> 00:04:34,050
And then I assigned the value 0 to this variable.

70
00:04:34,380 --> 00:04:41,190
And here I actually created a condition which determines the number of times that this loop is going

71
00:04:41,190 --> 00:04:42,290
to actually execute.

72
00:04:42,300 --> 00:04:43,230
OK.

73
00:04:43,290 --> 00:04:50,920
So here I said that until the value of this index variable is actually less than the value of the length

74
00:04:51,390 --> 00:04:52,570
of this array.

75
00:04:52,830 --> 00:04:55,750
Then this loop is going to be executed OK.

76
00:04:56,280 --> 00:05:03,180
And here I specified that after each execution of this for a loop the value of this index variable is

77
00:05:03,180 --> 00:05:05,260
going to be incremented by 1.

78
00:05:05,400 --> 00:05:06,100
OK.

79
00:05:06,390 --> 00:05:13,000
So for the first time that this loop is going to be executed the value of this index variable is zero.

80
00:05:13,130 --> 00:05:18,010
So 0 is less than the value of the length of these scores array.

81
00:05:18,080 --> 00:05:18,620
OK.

82
00:05:18,900 --> 00:05:19,940
For example.

83
00:05:20,130 --> 00:05:27,570
And here I actually instantiate it inside of this for loop I instantiated this object this variable

84
00:05:27,610 --> 00:05:30,620
all takes you value assignment operator.

85
00:05:30,780 --> 00:05:37,960
So now I am actually getting the text of this text view that I actually accept as an argument to respect

86
00:05:37,980 --> 00:05:41,730
it as you can see text through that good text that you think.

87
00:05:41,730 --> 00:05:47,040
And here we are converting this value to a string value so that we can actually assign that value to

88
00:05:47,040 --> 00:05:47,290
this.

89
00:05:47,310 --> 00:05:48,870
All that takes real value here.

90
00:05:48,880 --> 00:05:49,690
OK.

91
00:05:50,200 --> 00:05:55,970
And in line 78 as you can see I said that takes few that said text.

92
00:05:55,980 --> 00:06:00,660
So if you want to actually just add some text to this takes you here as you can see and inside of the

93
00:06:00,660 --> 00:06:07,800
practices of this set text Nefert I actually referred to the name to the name of the string class and

94
00:06:07,800 --> 00:06:11,130
I called them a fifth format on this class.

95
00:06:11,160 --> 00:06:12,970
So strange data format.

96
00:06:13,290 --> 00:06:19,200
And here inside of the Prentice's of this format Meffert as you can see first of all I've referred to

97
00:06:19,200 --> 00:06:27,510
the name of this variable all text view value so that the user can see the previous values the old values

98
00:06:28,200 --> 00:06:30,840
of these actually follow.

99
00:06:30,870 --> 00:06:33,490
As you can see the old values of this array.

100
00:06:33,630 --> 00:06:34,340
OK.

101
00:06:34,710 --> 00:06:36,860
Plus and this text.

102
00:06:36,930 --> 00:06:41,720
And here we are actually concatenating this value of this value here.

103
00:06:42,040 --> 00:06:48,540
So plus aflat number as you can see here we are actually specifying the format of our string.

104
00:06:48,540 --> 00:06:49,150
OK.

105
00:06:49,440 --> 00:06:53,220
Aflat number Colan percent to the.

106
00:06:53,220 --> 00:06:58,250
So this 2 here means two fields as against as you can see here too.

107
00:06:58,360 --> 00:06:58,800
Right.

108
00:06:58,810 --> 00:07:03,270
Just justify it feels OK to write justified fields.

109
00:07:03,360 --> 00:07:05,000
OK so person to D.

110
00:07:05,100 --> 00:07:11,670
And these the means that we need to actually put an a valuable type integer that actually relates to

111
00:07:11,670 --> 00:07:12,370
this.

112
00:07:12,510 --> 00:07:19,590
Up here with this torture an okay person to the to right justified fields colon.

113
00:07:19,860 --> 00:07:25,980
And here we are actually saying percent free the free justified free right justified Ifill's.

114
00:07:25,990 --> 00:07:30,440
OK so here again we put this token here D.

115
00:07:30,690 --> 00:07:34,720
And this the reverse actually relates to these scores.

116
00:07:34,720 --> 00:07:35,610
Some index here.

117
00:07:35,610 --> 00:07:36,200
OK.

118
00:07:36,780 --> 00:07:40,390
And here and at the end we actually put a new line character.

119
00:07:40,600 --> 00:07:46,250
OK so now let's actually go back inside these activity.

120
00:07:46,620 --> 00:07:48,450
Our main activity the Java file here.

121
00:07:48,480 --> 00:07:56,490
So here inside of these uncreate Meffert as you can see let's actually create some objects from the

122
00:07:56,990 --> 00:07:58,170
text view class.

123
00:07:58,200 --> 00:08:04,500
So as you can see here I created these objects here as you can see and hear as you can see the first

124
00:08:04,560 --> 00:08:07,220
object is called TXI the sport's name.

125
00:08:07,500 --> 00:08:14,220
And here you referred to the name of this idea here are that idea that takes the sport's name again.

126
00:08:14,430 --> 00:08:17,150
I created another object to fix the schools.

127
00:08:17,430 --> 00:08:22,680
And here you referred to the ID or that idea that takes this course.

128
00:08:22,860 --> 00:08:29,610
And here I actually again created another object from the sticks view class the scores average.

129
00:08:29,790 --> 00:08:37,100
And here again Ira this to the name of this idea these scores average and here takes the highest score

130
00:08:37,520 --> 00:08:40,620
and takes the highest score here as you can see.

131
00:08:40,850 --> 00:08:47,590
And again finally I created another object from this text takes your class here.

132
00:08:47,600 --> 00:08:50,960
I actually cast this object to a text view object.

133
00:08:50,990 --> 00:08:55,570
And here I actually referred to the name of this VTX the lowest score.

134
00:08:55,610 --> 00:09:00,810
OK so now let's actually create an array of integer numbers here.

135
00:09:00,830 --> 00:09:01,580
OK.

136
00:09:01,820 --> 00:09:05,350
So as you can see here this is an array of integer values.

137
00:09:05,390 --> 00:09:09,220
So as you can see the data type of this array is integer.

138
00:09:09,260 --> 00:09:16,160
And here I specified that I want to actually create an array by putting these brackets here and here

139
00:09:16,250 --> 00:09:23,140
I actually specify the name of this every scores Ari and here these are the values that they actually

140
00:09:23,320 --> 00:09:24,730
are assigned to this address.

141
00:09:24,780 --> 00:09:26,430
Ok these numbers.

142
00:09:26,810 --> 00:09:33,740
So now I want to actually paste some lines of code here and then I'll explain to you what's going on

143
00:09:33,740 --> 00:09:33,980
here.

144
00:09:33,980 --> 00:09:34,650
OK.

145
00:09:35,030 --> 00:09:38,890
So as you can see here these are the lines of code that actually paste that here.

146
00:09:39,050 --> 00:09:45,740
First of all I created an object from this support class as you can see the name of this object is my

147
00:09:45,740 --> 00:09:46,490
sport.

148
00:09:46,640 --> 00:09:52,610
And here I put an assignment operator here and I actually instantiated this object by putting these

149
00:09:52,880 --> 00:09:57,190
new word here and I refer again to the name of this sport class.

150
00:09:57,320 --> 00:10:02,300
And here we need to actually assign two values for the constructor of this class.

151
00:10:02,300 --> 00:10:02,720
OK.

152
00:10:02,960 --> 00:10:06,760
The first value as you can see is actually a string value.

153
00:10:07,010 --> 00:10:10,190
And inside the double quotes this is the sports name.

154
00:10:10,220 --> 00:10:11,250
Or keep boxing.

155
00:10:11,480 --> 00:10:15,950
And here you referred to these three as you can see scores arii.

156
00:10:16,030 --> 00:10:16,740
So they.

157
00:10:16,790 --> 00:10:20,920
So the second argument actually accepts an array of type integer.

158
00:10:21,050 --> 00:10:21,440
OK.

159
00:10:21,560 --> 00:10:22,340
As you can see here.

