Now let's actually create another MFL card get the maximum value.
OK.
So just I just posted here as you can see this is our Meffert.
OK.
That they actually pasted here.
And again the access modifier of this and if it is public the return type of this method is it.
So this means that this Smurfit is going to ask you to return a value of type integer.
OK.
And the name of this method is get the maximum value and this method does not actually accept any arguments.
Ok so now as you can see here inside of these Smurfette these are actually our implementations inside
of this method.
And here I actually created a variable of type integer highest score assignments operator.
And here I am actually assuming that the value of that is actually the inside of the index zero of these
scores array is actually the highest value as you can see here.
And again I created another for a look here.
Four in the score scores.
If the value of this score value is greater than the value of this highest score as you can see here
then highest score assignment operator scored.
OK then we are actually assigning the value of the score to this highest score variable here.
OK.
And at the end you are actually returning the value of this highest score value.
Ok and now let's actually create another method here.
So as you can see here this is our Meffert get the average value here as you can see.
So the access modifier of this method is public.
OK.
And the return type of this method is double.
So this means that if it is going to actually return a value of type double and the name of this method
is actually get the average value.
OK.
And inside of the Smurfit as you can see these these are actually our own implementations inside of
this method.
I created a variable of type actually the integer as you can see and the name of this variable is total
and I assigned this number to zero to this valuable total.
OK.
And here I created a for loop ok and enhanced for loop for end score score.
So it's going to either rate over that actually values that are actually inside of these scores.
OK.
And here inside of these for loop I am actually assigning the value of this score variable as you can
see to this total of valuable here OK.
So this line of code here is actually the same as this line of code that I am about to write.
OK.
So total assignment operator total plus score.
OK.
So hopefully that makes sense.
And at the end we are actually returning a value OK.
So first of all I am actually casting this value the value of this toward all valuable as you can see
this value is of type integer.
OK.
And we need to actually return a value of type double.
So here I am actually casting this value to a double value here.
As you can see and I am actually dividing that value as you can see here by the value of the length
of these Arey scores at it.
OK so now it's actually create another Meffert here.
Now let's actually create another method here inside of this sport class.
So as you can see here this is our Mefford as you can see here.
I'll paste it here.
OK.
And the access modifier of this method is public.
The return type of this method is void and the name of this method is let's output this calls.
OK.
And this Smurfette this time is going to actually accept an argument of type of text view.
OK.
So as you can see here inside of the Smurfette I created I actually declared a variable of types 3 and
as you can see in line 79 and the name of this valuable is all it takes for you.
OK.
And here I actually created a for loop here as you can see an inside of the practices of this for loop.
First of all I created a variable of type integer and the name of this variable is index.
OK.
And then I assigned the value 0 to this variable.
And here I actually created a condition which determines the number of times that this loop is going
to actually execute.
OK.
So here I said that until the value of this index variable is actually less than the value of the length
of this array.
Then this loop is going to be executed OK.
And here I specified that after each execution of this for a loop the value of this index variable is
going to be incremented by 1.
OK.
So for the first time that this loop is going to be executed the value of this index variable is zero.
So 0 is less than the value of the length of these scores array.
OK.
For example.
And here I actually instantiate it inside of this for loop I instantiated this object this variable
all takes you value assignment operator.
So now I am actually getting the text of this text view that I actually accept as an argument to respect
it as you can see text through that good text that you think.
And here we are converting this value to a string value so that we can actually assign that value to
this.
All that takes real value here.
OK.
And in line 78 as you can see I said that takes few that said text.
So if you want to actually just add some text to this takes you here as you can see and inside of the
practices of this set text Nefert I actually referred to the name to the name of the string class and
I called them a fifth format on this class.
So strange data format.
And here inside of the Prentice's of this format Meffert as you can see first of all I've referred to
the name of this variable all text view value so that the user can see the previous values the old values
of these actually follow.
As you can see the old values of this array.
OK.
Plus and this text.
And here we are actually concatenating this value of this value here.
So plus aflat number as you can see here we are actually specifying the format of our string.
OK.
Aflat number Colan percent to the.
So this 2 here means two fields as against as you can see here too.
Right.
Just justify it feels OK to write justified fields.
OK so person to D.
And these the means that we need to actually put an a valuable type integer that actually relates to
this.
Up here with this torture an okay person to the to right justified fields colon.
And here we are actually saying percent free the free justified free right justified Ifill's.
OK so here again we put this token here D.
And this the reverse actually relates to these scores.
Some index here.
OK.
And here and at the end we actually put a new line character.
OK so now let's actually go back inside these activity.
Our main activity the Java file here.
So here inside of these uncreate Meffert as you can see let's actually create some objects from the
text view class.
So as you can see here I created these objects here as you can see and hear as you can see the first
object is called TXI the sport's name.
And here you referred to the name of this idea here are that idea that takes the sport's name again.
I created another object to fix the schools.
And here you referred to the ID or that idea that takes this course.
And here I actually again created another object from the sticks view class the scores average.
And here again Ira this to the name of this idea these scores average and here takes the highest score
and takes the highest score here as you can see.
And again finally I created another object from this text takes your class here.
I actually cast this object to a text view object.
And here I actually referred to the name of this VTX the lowest score.
OK so now let's actually create an array of integer numbers here.
OK.
So as you can see here this is an array of integer values.
So as you can see the data type of this array is integer.
And here I specified that I want to actually create an array by putting these brackets here and here
I actually specify the name of this every scores Ari and here these are the values that they actually
are assigned to this address.
Ok these numbers.
So now I want to actually paste some lines of code here and then I'll explain to you what's going on
here.
OK.
So as you can see here these are the lines of code that actually paste that here.
First of all I created an object from this support class as you can see the name of this object is my
sport.
And here I put an assignment operator here and I actually instantiated this object by putting these
new word here and I refer again to the name of this sport class.
And here we need to actually assign two values for the constructor of this class.
OK.
The first value as you can see is actually a string value.
And inside the double quotes this is the sports name.
Or keep boxing.
And here you referred to these three as you can see scores arii.
So they.
So the second argument actually accepts an array of type integer.
OK.
As you can see here.