And now I need to actually specify some arguments.
So first I need to specify the speed of my car object.
For example 90 comma and now I need to actually specify that whether my car object has a braking system
or not.
So true.
OK.
Come up and then I need to actually specify the number of wheels of my car object 4.
Ok so now let's actually create another text you object in order to refer to the name of that text through
which is related to the car object.
OK.
So inside this main activity or Java here text you x the car assignment operator and then I need to
actually specify that this object is or is actually a text view object not a view object.
So you are actually casting this object to text you find view by ID or dot ID Dot T X the car.
OK.
And I need to actually put in a semi-colon at the end of my statement.
OK so now I can actually type in here.
TXI the card that said text.
And then I can actually refer to the name of this object.
My car got to a strange Meffert.
OK.
And let's actually run our project and see what happens.
So now as you can see here now these values are outputted the screen.
OK.
So speed 90 can break a true number of wheels and right speed is zero.
And this value is because that we didn't actually call the right fit on this Michod object.
OK.
So now if we actually called that Smurfette on this Michod here and if I run my project again let's
see what happens.
OK.
As you can see here now this value is outputted.
This could 360.
OK.
So hopefully that makes sense.
And now let's actually go inside this motorcycle class.
So inside this motorcycle class again suppose that we don't have any characteristics that are specific
only to the motorcycle class.
So we need to actually create a constructor for this motorcycle class in order to actually.
Because whenever we want to create an object from a motorcycle class that constructor is going to be
called.
OK.
So if we can actually pass some values to that's true that constructor.
So first of all let me point out that this motor cycle is actually a vehicle.
OK.
So we can inherit all of the features and behaviors that are inside the vehicle class.
OK.
So now I need to actually create a constructor for this a motorcycle class.
Ok motor I need to actually put in a pair of round brackets here.
I need to actually open and close this constructor by using these curly braces.
And now I need to actually specify that some arguments here and we need to actually initialize the constructor
of the superclass So the superclass of this class is vehicle.
OK.
And we need to actually initialize this constructor here.
OK.
So inside these motocycle class.
So inside the constructor I can just type in super and inside the practice is here.
Now I need to actually specify some arguments.
Int speed comma boolean has braking system OK.
Comma and int number of reals.
OK.
And inside the Prentice's of these superhit I can actually pass these values in order to initialize
the constructor of the superclass.
OK so Spaeth comma has braking system comma number of fields.
OK.
So hopefully that makes sense.
And then I want to actually override the twist through my fate that is inside the superclass.
So the superclass is vehicle.
I can actually override this method.
As you can see here.
OK.
So instead of a motorcycle class I can just refer to the name of that if it were strange and it is can
I actually execute the implementations of the twisting my faith that is inside these superclass.
OK.
So hopefully that makes sense.
So now let's actually go inside this main activity that Javal fight here and now we need to actually
create an object from this motorcycle class.
OK.
So I can't just refer to the name of that class motorcycle the name of this object is my motorcycle
and then I put an assignment operator here.
New motor cycle OK.
And now it is actually passing some values.
So the speed of my motor cycle is for example 500 karma has braking system.
True karma number of wheels too.
OK.
And then I need to actually put in a semi-colon at the end of my statement.
So now let's actually create another text you object text you and the name of this object is TXI the
motor cycle
OK.
And let's actually put in an assignment operator here and then we need to actually cast this object
to a text view object find view by ID or that Id dot t the motorcycle OK.
So now let's actually to change these chapiter see to our lowercase C..
OK.
And then we can actually call our Mefford right on the spot.
My motorcycle object so my motorcycle object.
That's right.
OK.
And then we can actually output these values through the screen dots and text my motorcycle dot to a
string.
OK.
So hopefully that makes sense.
Now let's actually run our project and see what happens.
OK everyone.
Now as you can see these values are outputted to the screen.
OK speed 500 can break through number of wheels to right speed 1000.
OK.
So hopefully that makes sense.
Now I want to actually do something here.
OK.
So now I want to actually when a person clicks on this go button here I want to just text you here to
respond.
OK.
So for example when I click on the scope button here I want this text to change.
OK.
So let's go back and say this main activity that you have a file here.
And let's actually create another test you here text through the result and then I put an assignment
operator and here I actually cast this object to a text view object and then I just type in here find
view by id r that ID that T X the results.
OK.
And then I put a semicolon at the end of my statement.
Now I want to actually are referring to the bottom to the bottom that we actually put inside this content
underline minute example.
OK.
So inside this main activity the Java as you can see here you actually created four different objects
from this text class.
OK.
You have another class called Potten.
So now we need to actually create a potent object.
OK button.
OK.
PTEN go.
OK.
And then I put an assignment operator here and here we need to actually cast this object to about an
object.
And remember that despite an object actually inherits all of the features and behaviors that are inside
the tick view class.
OK so we need to actually cast this object to our putten object.
And then here we can actually type in find view ID or that ID that PTEN go.
OK.
And then I put a semi-colon at the end of my statement.
So let's actually hold the comment key and then click on this button here.
As you can see here BOTTEN actually inherits all of the features and behaviors that are inside this
text class.
OK.
So let's actually hold the common key again and then we can just text you here.
So as you can see here this takes through inherits all of the features and behaviors that are inside
this view class.
So this bottom class actually indirectly inherits all of the features and behaviors that are inside
the view class.
OK.
So we can say that the button is actually a view.
OK.
So hopefully that makes sense.