So as you can see here now our values are outputted to the screen.
OK.
So the name of our object is my leopard color yellow speed 400 power 200 number of legs for fight true
animal value eighty thousand claws.
OK.
So hopefully that makes sense.
Now I can actually put a space between these two values 80000 and class.
So let's actually go inside this cat class and here I can actually put an A-plus operator here.
And then I can actually put in two double coats and now I can actually put in a space here.
OK.
So let's actually run our project again and see what happens.
OK.
So as you can see here there is space between these two values OK 80000 and class.
OK.
So hopefully that makes sense.
Now let's actually go inside this bird class and let's actually put in our own implementations inside
this birth class.
So as you can see here this bird class is actually an animal.
OK.
The bird is not inside the chat family anymore.
OK.
So we can not relate this to the cat class ok not actually to say extends cats because the bird and
the cat does not relate to each other ok but our bird is actually an animal.
So we can just type in here S-turns animal and now we can actually put in the characteristics inside
the Speth class that are specific only to this bird.
OK.
For example a bird can fly.
Ok so I can just create a boolean variable boolean and then I can just give a name to this boolean variable
can fly.
And then I can actually put in an assignment operator here.
And then I can actually give a value to this instance variable for example and then I can actually assign
a value to these boolean instance variable true.
OK so first let's actually.
So let's actually specify the access modifier of these boolean variable.
But and because all birds can fly.
We can actually say that this instance variable should be a constant.
OK so I can just put the final keyboard here.
OK.
Now the value of this instance variable cannot be changed.
OK so here let's actually create another instance variable for example that is specific only to the
SPED class.
So private int number of leks number of beings.
OK.
Now let's actually create a constructor for the special class.
OK.
So first of all I need to actually specify the axis modifier of the constructor public and the name
of this constructor must be the same as the name of this class bird.
And then I need to put in a pair of round brackets after my constructor name and then I need to actually
open and close my constructor by using these curly braces.
So as you can see here it's now showing us an error because we are actually inheriting all of the features
and behaviors that are that are inside these Animal class.
We need to actually initialize these constructor inside our birth class.
OK.
So as you can see here inside this Animal class we have a custom code constructor that we created ourselves.
And if we want to actually inherit all of these behaviors and features that are inside this animal class
into a dispersed class we need to actually first of all initialize those initialize that constructor
that is inside the Animal class.
Ok so first of all I need to actually first of all inside the constructor I can't just type in super.
So now I need to actually passing some arguments here some values.
So the first argument should be of type.
Strange.
And let's actually go inside these animal class and see the arguments here.
As you can see Name Caller amount of speed and amount of power.
OK.
So inside the special class I can just type in here name comma string color comma and amount of speed.
Comma and amount of power.
OK comma and then as you can see we've got two other instance variables that are only specific to disperse
class.
Ok so I can just type in here boolean can fly
karma in a number of things.
OK.
And now I can actually passing these values that are related to the superclass.
OK.
So I can just type in your name comma color comma amount of speed comma amount of power.
So as you can see here now we have successfully initialized the constructor of the superclass.
And now we can actually initialize our own instance variables.
OK the instance variables that are related only to this class.
So now I want to actually again show you another important point about constants.
So let's actually refer to this instance variable translate here.
These dot can fly.
Assignment operator can fly.
So now as you can see it's now showing us an error that's actually Harvard or mouse pointer over this
area and see what's the error cannot assign a value to final variable can fly.
So as you can see here in line 11 we have an instance variable that is a constant.
And this means once we assign a value to this instance variable we cannot change the value of this constant
anywhere in our class.
OK.
Or in.
Or in other classes OK we cannot change the value of this instance variable.
Once we assign a value to this constant so here as you can see we assigned this value here to our constant.
So we cannot change.
As you can see we cannot change that value to another value in line 20.
So if we want to actually eliminate this error I need to actually delete this true here and now as you
can see here the error is gone.
OK.
Here as you can see we just in line 11.
We just declared this instance variable and we didn't initialize this instance variable but in line
20 we did initialize this instance variable OK.
And now I want to actually initialize my other instance variable number of wins.
OK does that number of things.
Assignment operator number of things.
OK.
So now I want to actually create a set here and to get her Meffert for my instance variable instance
variable here.
This can fly instance variable is a constant.
OK so we cannot actually create a set here for this instance variable B.
We can only create a get here for this instance variable because this is a constant and we cannot actually
change the value of this instance variable.
Once we assign a value to this instance value.
OK so now this is actually the Right-Click are inside this birth class and then click on generate and
then click on get here and setter.
So just select both of these are instance variables here and then click on OK.
So now as you can see here now we've got to get hairs here and we've got a setter here.
OK.
So as you can see here is can fly is I get her my first for my can fly instance variable I don't like
this is here.
It's actually the change that to get.
And as you can see we've got a good number of things Meffert as you can see here.
This is our Get here for this instance variable.
And this is a setter for this instance variable.
OK.
So now let's actually all right that was telling me if that is inside the superclass of this world class.
So as you can see here the superclass of this bird class is Animal class OK.
And inside the Animal class we've got this string Meffert here.
OK.
So we can actually use the implementation's that are inside of these two a string Meffert.
So inside this bird class as you can see here it says Return superdad to stream here.
OK.
And then I can actually put in an A-plus operator here strange that format and then inside the prentices
I can just put in two double coats and here I need to actually specify the formatting instructions of
my object.
OK.
Percent as co-lead percent B And percent yes Colan percent D.
OK.
And let's actually put in a comma here and now we need to actually specify the arguments.
OK.
So for my first token I need to actually put in a string value.
So.
So here I can just type in flight.
OK come on.
And then I need to actually putting a value of type Boolean.
As you can see Person B.
So as you can see here I can actually put in this instance variable here can fly comma.
And then again I need to actually put in a value of type string here for this token here.
OK.
So as you can see we've got this number of things here.
Instance valuable.
So I can just type in here number of things.
OK.
Comma and now I need to actually put in a value of type integer here.
OK.
Percent D.
So this instance variable is of type Integer.
And now I can just refer to this instance variable here a number of weeks.
OK.
And now as you can see are two string Meffert is ready.