We can also define methods and or superclass and then override these methods and all subclasses and
was overwriting.
I mean basically you can get especially from noti functionality to your
to your method in your subclasses.
So we make a method here.
And we said why it has burst.
Maybe every animal has passed it at some point.
So we print all that and be best to
stay and then we can do because we extend this superclass we can also call it so we can say Lessie and
then Spurstow.
And we basically print out a statement serratia.
So happy birthday
we get not.
That's
because you don't need to print it out again.
So now we got happy.
And we can modify this bursty for all pets because what love and with no name has birth day you just
could print it.
Happy birthday.
And with you our pets you may be one to say happy birthday.
And then the name of you are and I'm the alsos maybe we make.
It's like this.
We say
boy it's his birthday.
So you say exact same name as an awesome class.
And then go on to print aren't what we had in our superclass.
Want to execute the court said we have an hour or so per class method and we do it by say super super
T-word with this key word.
We access our superclasses So this class right here and now we can access our values and also all methods
can say perhaps burster when all print all hippie stay right here because this method gets called.
And that's what gets printed out.
And then we basically just print art or name again.
So we just want to print art in the name of our object.
So this variable here.
So if we know
core Lessie we firstly have to give it a name called Lessie and then we run it then we should get.
Happy birthday let's see.
And that's basically called it.
Yeah overwriting a method.
So we extend our superclass method and call it.
So we use the same name then we call it causes a cloth method and then we add more function functionality
to it.
And on simple example we just printed out a name but of course this can be more complex.