OK.
Now let's actually creates a getter method for this name instance variable.
And remember that this instance variable is a constant.
OK.
So we cannot change the value of this instance variable from another method or class.
So here I need to only create a good head Smurfette.
OK not a setter my it because we cannot change the value of this instance variable once we assign a
value to this instance variable.
Ok so first of all I need to specify the axis modifier of this get RMF it public.
OK.
And here I need to specify the return type of this term if it is 3 and the name of this never is gets
name.
OK.
And then I need to put in a pair of round brackets after my first name and then I need to open and close
my method by using these curly braces.
OK.
So here.
So inside the Mefford now I need to return the value of this name instance variable OK.
So as you can see here this is OUR get and my faith for this name instance variable and we don't need
to actually create a certain method for this instance variable because because this instance value is
a constant and we cannot change the value of this instance variable from another method or class OK
we just need to create a get in effect in order to allow other classes to access the value of these
name instance variable.
OK.
So again we need a good head on my faith for this color instance variable.
So the access modifier of this are get him if it is public and the return type of the Smurfette is a
strange and the name of this method is get color OK.
And then I need to actually put in a paragraph brackets after my method name.
And then I need to open and close my method by using these curly braces inside them if I can just return
the color instance value.
OK.
So as you can see here these are the Get help efforts.
These are they get hairs for instance variables.
So here I want to actually create a get here and a setter for this amount of speed instance variable.
So as you can see here this instance variable is not a constant.
OK.
So we can actually create a set in my foot in order to allow that other classes you know to change the
value of this instance variable.
So first I create a certain my faith for this amount of speed instance variable.
So the access modifier of this method is public and the return type of this method is voit.
OK.
And then the name of this novel is set amount of speed.
And then I need to actually put in a pair of round black kids after my Meffert name and then inside
the apprentice's I need to actually specify that this is going to actually accept an argument of type
int and the name of this argument is you ok.
It can be amount of speed to for example amount amount of speed.
OK.
And then I need to open and close my method by using these curly braces.
So now inside I'm afraid I can't just putting this key vote that amount of speed assignment operator.
Amount of speed.
OK.
So because these are the name of the name of this argument is the same as this is the same as the name
of this instance variable.
I needed to put this key word here in order to refer to this instance variable here and then I put an
assignment operator here and then I assigned this argument to this instance variable.
OK.
In this video I made a mistake.
OK.
And here I want to actually fix these mistakes.
First of all inline 20 are actually assigned at this amount of speed argument to this amount of power
instance variable.
And this is wrong.
I should actually FAIL to this amount of power argument to name.
So I actually to type in amount of power.
OK.
And the next mistake that I made is in this method set amount of speed first.
I actually deferred to the name of the the name of this amount of power instance variable and this is
right.
This left is for actually sitting values to this amount of spit instance variable.
So change the name of this instance variable to amount of speed.
OK.
And then as you can see here we are actually assigning this amount of speed argument to this amount
of speed instance variable.
Ok so now we actually fixed these mistakes.
OK.
So make sure that you actually assign this argument to this amount of speed instance variable in this
method.
OK.
So here again I create another get my faith for this is amount of speed instance valuable public.
And as you can see the return type of this method is of type int.
OK.
As you can see the data type of this instance variable is it.
So we need to actually turn a value of type int from this I get head Meffert.
OK.
So publish it gets amount of speed and then I need to put in a pair of round brackets after my Meffert
name.
And then I need to open and close my effect by using these curly braces here.
I just need to return the value of this amount of speed instance variable OK.
So again I actually create a set in my head for this amount of power instance variable.
So I just need to type in here public.
And the return type of this method is void and the name of this method is set amount of power.
And then I need to put in I've had around brackets after of my name.
So here I want to specify that this is going to actually accept an argument of type int So here the
data type of the argument is int and the name of this argument is.
Amount of power.
OK.
And then I need to open and close my method by using these curly braces.
So inside I'm afraid I just live in these thoughts.
I'm out of power assignments operator.
Amount of power.
OK.
So this is our set and my faith for the amount of power instance variable.
And then I need to actually create or get home fit for this instance variable amount of power.
So public and the return type of This Is It.
And the name of this method is gets amount of power.
And then I need to put in a pair of hands brackets after my name.
And then I need to actually open and close my method by using the curly braces.
So here I just need to return the value of this amount of power instance variable amount of power instance
variable.
Ok so now I created the guitarist and the setters for these instance variables.
So now I want to actually redefine.
So now I want to actually redefine a method that is actually inside the object class extends object.
So this object class has some methods and variables and this animal class can actually access those
are methods or variables because this animal class actually inherits all the behaviors and features
of this object class.
Ok by default.
And here are I just wanted to show you that this animal class actually inherits all of these behaviors
by default.
OK.
So in order to actually access behaviors that are inside this object class I can just refer to the name
of those methods.
So for example to a strange as you can see this is a method that is inside this object class.
Attari and this override key word here means that we are redefining or overriding a method that is inside
this object class.
OK.
And here I can actually put my own instructions my own implementations inside this method.
OK.
So this is how we can actually access the behaviors that are inside the class that we are inheriting
from.
OK so if we actually delete these two words here as you can see it's going to actually show us enough
no errors because by default this animal class is actually inheriting all of the behaviors and features
that are inside the inside the object class.
OK.
And here as you can see that the access modified of the Smurfette is public.
The return type of this method is a string and the name of this method is too strange.
OK so now let's actually go inside the object class in order to find these two string method.
OK.
So here I just need to type extents object and then and then hold the command key and then click on
this object class.
And here you are to actually find the two is three Meffert.
OK.
So in order to actually find a method or a specific keyword in your classes if you are using too much
or six you just need to hold the command key plus the key on your keyboard.
Or if you are using any of those machine you need to actually hold the control key plus the key on your
keyboard.
OK.
I can actually search for my method names or keywords for example to a string.
So as you can see here this is this two string Meffert.
OK.
And these are some of the comments that are actually explaining the functionalities of these two unstring
Meffert OK.
So as you can see here it says it returns a syringe containing a concise human readable description
of this object.
OK.
Subclasses are encouraged to override the Smurfette and provide an implementation that takes into account
the object's type and data.
OK the default implementation is equivalent to the following expression as you can see it is this is
the expression that is the default implementation of this Nefert.
OK that's class that gets named plus add sign plus integer data to hex strange.
And then inside the apprentice's as you can see hash code.
OK.