Hire everyone in this tutorial we are going to go ahead and create another Android application.
So just click on this.
Start in your Android studio project here and here for the application name just type in here app 23
and then click on next and here choose API 16 Android 4.1 Jelly Bean for a minimum STK next.
And here choose our Blache activity next.
And then actually kind of finish.
Now let's actually select this hellova of the takes here and then press on delete key on your keyboard.
Now double click on these arrays folder here.
Lay out activity underline made that example and then select this floating action button here and then
press on the real key on your keyboard.
OK.
So now let's actually go back inside this content underline minute example.
And here we want to actually design the user interface of our application.
OK.
OK so now let's actually drag linearly out vertical at the center of these relatively out here.
OK.
And now let's actually find the scroll view here.
Hold it actually we need to drag our vertical scroll view into these linear linear.
Lay out your vertical as you can see here.
And then we need to actually put in a linearly vertical.
Inside this scroll view here as you know this scroll you can only accept one direct choice.
OK.
So we actually put these linearly vertical inside this scroll view here.
OK.
And now let's actually drag up takes few large takes you into these linearly outwards to call here.
OK.
And double click and this takes you here.
And for the text just typing here the name of the game is.
So as you can see here I just actually wrote here the name of the game is colon.
OK.
And then present Enter key on your keyboard.
So now let's actually try another large text view into this linearly alphabetical vertical here and
double click on these text view here and delete the text of this text view.
And for the ID just type in here TXI the game name.
OK.
And then present Enter key on your keyboard.
That's actually right.
Another large text view into this linearly aesthetical here.
And this time double click and this takes you and for the text just typing here this course of the game
are colon OK.
So as you can see here I wrote here this course of the game are OK and then press Enter key on your
keyboard.
So now it's actually right and other large text view into this linearly or two article here and WDTN
the sticks you hear delete the text of this text view and for the ID just a in here takes the game scores.
OK.
And then press that enter key on your keyboard.
So now let's actually track and other large takes you into this linearly Altschuler equal here.
OK.
And then double click and these are text view here.
OK.
And for the text of this text view just type in here.
The lowest score of the game is colon.
OK.
So as you can see here are you right here the lowest score of the game is called in.
OK.
And then present Enter key on your keyboard and then let's actually right and other large takes you
into this linearly elsewheres equal here and WDTN the state's view here.
Deleted the text of the stakes for you and for the ID just in here takes the game lowest score.
OK.
And then present Enter key on your keyboard.
Now let's actually decide on another large this view into this linearly 20 call.
Double click on it.
And for the text just taken here the highest score of the game is ok colon and then a person into here
on your keyboard Let's actually write another large view into this linearly alphabetical here and double
click on it and delete the text of this text view and for the ID just taken here takes the game highest
score OK score and then press on and Turkey on your keyboard.
OK so now let's actually try and order a large text view into this linearly or vertical here and double
click and this takes you here.
OK.
And then just type in here the average value of this calls is colon and then our person and the key
on your keyboard.
Now let's actually track a larger text view into these linearly alphabetical here and double clicking
on it.
Is the text of this text for you and for the idea just typing here takes the game average takes the
game average value of scores.
OK.
And then press Enter key on your keyboard.
So now the design of our user interface is actually finished.
Now let's actually go back inside this main activity or job of file here delete these lines of code
that are actually related to the Options menu here.
OK.
And then delete this block of code that is actually related to the floating action button.
And now we can actually put in our own code here.
OK.
So first of all we need to actually create a Java class.
So just click on File Neo and then click on Java class.
OK.
And for the class name just type in here again and then click on OK here.
So as you can see here this is our game class.
OK.
And then we can actually put our own codes inside of this game class.
OK so now let's actually create our two instance variables.
OK.
As you can see here these are my two instance variables.
And as you can see the access modifier of these instance variables is actually private.
And the other type of this instance but is strange and the name of this instance variable is actually
a game name OK.
And as you can see here I didn't instantiate this instance variable here.
OK I just declared this instance variable.
And here again as you can see the data type of this instance variable is integer.
And here I just want to actually create a two dimensional array.
OK so I just put in two pair of brackets here as you can see here.
And then the name of this instance variable is is score's.
OK.
So as you can see here again I didn't instantiate this instance variable here.
OK.
Now let's actually create a constructor and then instantiate this instance variables inside of that
constructor OK.
So as you can see here this is my constructor and the access modifier of the of my constructor is public.
The name of my constructor is gain as you can see here the name of the constructor must be the same
as the name of the class name.
OK.
And this constructor actually accepts two arguments.
Ok the first argument as you can see here the type of the first argument is strange the name of my first
argument is game name.
And again the type of my second argument as you can see is integer a two dimensional array of integers
as you can see here.
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
name of this instance variable.
OK.
So inside of this constructor as you can see here I actually instantiated these instance variables these.
So as you know this keyboard as you can see here is actually referring to an object that is actually
created from this game class for example if you actually create an object from the game class inside
of this main activity that java file then this keyword here refers to that object.
OK.
And this name actually refers to this game an instance variable assignment operator.
And here I am actually referring to this game name instance variable as you can do this.
Our game name our argument as you can see this game is actually fit into this argument.
And this game name is actually referring to this instance variable.
OK.
So in order because of the name of this instance variable is the same as the name of this argument here
we need we actually need it to refer to this game an instance variable.
By preceding its name by this key word.
OK.
So this dart game name.
Actually the first to this instance variable and this game actually refers to this argument.
OK.
And here we are assigning this argument to this instance variable.
Actually we are instantiating this instance variable here and here again this is this.
It's the same story we are referring to this is called this instance variable by presidium it's named
by this key vote.
And here you are assigning these scores argument to this instance variable here.
OK.
So hopefully that makes sense.
And now let's actually putting some lines of code here after the constructor here.
So here let's actually create our set here and I'll get here for this game name instance variable here
as you can see.
So here as you can see here this is my upset game named Mefford.
OK this is a setter for this game named instance variable.
And this method actually accepts an argument of types 3 in the name of this argument is game name.
And here again I am actually assigning the value of this argument to this instance variable.
It is that game name assignment operator gave me.
Ok and now let's actually create a getter for this game an instance variable.