<s>
Method	B-Language
overriding	I-Language
,	O
in	O
object-oriented	B-Language
programming	I-Language
,	O
is	O
a	O
language	O
feature	O
that	O
allows	O
a	O
subclass	O
or	O
child	O
class	O
to	O
provide	O
a	O
specific	O
implementation	O
of	O
a	O
method	B-Language
that	O
is	O
already	O
provided	O
by	O
one	O
of	O
its	O
superclasses	O
or	O
parent	O
classes	O
.	O
</s>
<s>
In	O
addition	O
to	O
providing	O
data-driven	O
algorithm-determined	O
parameters	O
across	O
virtual	O
network	O
interfaces	O
,	O
it	O
also	O
allows	O
for	O
a	O
specific	O
type	O
of	O
polymorphism	B-Application
(	O
subtyping	O
)	O
.	O
</s>
<s>
The	O
implementation	O
in	O
the	O
subclass	O
overrides	B-Language
(	O
replaces	O
)	O
the	O
implementation	O
in	O
the	O
superclass	O
by	O
providing	O
a	O
method	B-Language
that	O
has	O
same	O
name	O
,	O
same	O
parameters	O
or	O
signature	O
,	O
and	O
same	O
return	O
type	O
as	O
the	O
method	B-Language
in	O
the	O
parent	O
class	O
.	O
</s>
<s>
The	O
version	O
of	O
a	O
method	B-Language
that	O
is	O
executed	O
will	O
be	O
determined	O
by	O
the	O
object	O
that	O
is	O
used	O
to	O
invoke	O
it	O
.	O
</s>
<s>
If	O
an	O
object	O
of	O
a	O
parent	O
class	O
is	O
used	O
to	O
invoke	O
the	O
method	B-Language
,	O
then	O
the	O
version	O
in	O
the	O
parent	O
class	O
will	O
be	O
executed	O
,	O
but	O
if	O
an	O
object	O
of	O
the	O
subclass	O
is	O
used	O
to	O
invoke	O
the	O
method	B-Language
,	O
then	O
the	O
version	O
in	O
the	O
child	O
class	O
will	O
be	O
executed	O
.	O
</s>
<s>
This	O
helps	O
in	O
preventing	O
problems	O
associated	O
with	O
differential	O
relay	O
analytics	O
which	O
would	O
otherwise	O
rely	O
on	O
a	O
framework	O
in	O
which	O
method	B-Language
overriding	I-Language
might	O
be	O
obviated	O
.	O
</s>
<s>
Some	O
languages	O
allow	O
a	O
programmer	B-Application
to	O
prevent	O
a	O
method	B-Language
from	O
being	O
overridden	O
.	O
</s>
<s>
Ada	B-Language
provides	O
method	B-Language
overriding	I-Language
by	O
default	O
.	O
</s>
<s>
is	O
expected	O
to	O
be	O
actually	O
overriding	B-Language
,	O
or	O
not	O
.	O
</s>
<s>
C#	B-Application
does	O
support	O
method	B-Language
overriding	I-Language
,	O
but	O
only	O
if	O
explicitly	O
requested	O
using	O
the	O
modifiers	O
and	O
or	O
.	O
</s>
<s>
When	O
overriding	B-Language
one	O
method	B-Language
with	O
another	O
,	O
the	O
signatures	O
of	O
the	O
two	O
methods	O
must	O
be	O
identical	O
(	O
and	O
with	O
same	O
visibility	O
)	O
.	O
</s>
<s>
In	O
C#	B-Application
,	O
class	B-Application
methods	I-Application
,	O
indexers	B-Application
,	O
properties	B-Language
and	O
events	O
can	O
all	O
be	O
overridden	O
.	O
</s>
<s>
Non-virtual	O
or	O
static	B-Language
methods	I-Language
cannot	O
be	O
overridden	O
.	O
</s>
<s>
The	O
overridden	O
base	O
method	B-Language
must	O
be	O
virtual	O
,	O
abstract	O
,	O
or	O
override	B-Language
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
modifiers	O
that	O
are	O
used	O
for	O
method	B-Language
overriding	I-Language
,	O
C#	B-Application
allows	O
the	O
hiding	O
of	O
an	O
inherited	O
property	O
or	O
method	B-Language
.	O
</s>
<s>
This	O
is	O
done	O
using	O
the	O
same	O
signature	O
of	O
a	O
property	O
or	O
method	B-Language
but	O
adding	O
the	O
modifier	O
in	O
front	O
of	O
it	O
.	O
</s>
<s>
C++	B-Language
does	O
not	O
have	O
the	O
keyword	O
that	O
a	O
subclass	O
can	O
use	O
in	O
Java	B-Language
to	O
invoke	O
a	O
superclass	O
version	O
of	O
a	O
method	B-Language
that	O
it	O
wants	O
to	O
override	B-Language
.	O
</s>
<s>
Instead	O
,	O
the	O
name	O
of	O
the	O
parent	O
or	O
base	O
class	O
is	O
used	O
followed	O
by	O
the	O
scope	B-Language
resolution	I-Language
operator	I-Language
.	O
</s>
<s>
overrides	B-Language
the	O
class	O
's	O
method	B-Language
,	O
so	O
as	O
also	O
to	O
print	O
its	O
height	O
.	O
</s>
<s>
The	O
method	B-Language
in	O
class	O
,	O
by	O
invoking	O
the	O
parent	O
version	O
of	O
method	B-Language
,	O
is	O
also	O
able	O
to	O
output	O
the	O
private	O
variables	O
and	O
of	O
the	O
base	O
class	O
.	O
</s>
<s>
In	O
C++11	B-Language
,	O
similar	O
to	O
Java	B-Language
,	O
a	O
method	B-Language
that	O
is	O
declared	O
final	O
in	O
the	O
super	O
class	O
cannot	O
be	O
overridden	O
;	O
also	O
,	O
a	O
method	B-Language
can	O
be	O
declared	O
override	B-Language
to	O
make	O
the	O
compiler	O
check	O
that	O
it	O
overrides	B-Language
a	O
method	B-Language
in	O
the	O
base	O
class	O
.	O
</s>
<s>
In	O
Delphi	B-Language
,	O
method	B-Language
overriding	I-Language
is	O
done	O
with	O
the	O
directive	O
override	B-Language
,	O
but	O
only	O
if	O
a	O
method	B-Language
was	O
marked	O
with	O
the	O
dynamic	O
or	O
virtual	O
directives	O
.	O
</s>
<s>
In	O
Eiffel	B-Language
,	O
feature	O
redefinition	O
is	O
analogous	O
to	O
method	B-Language
overriding	I-Language
in	O
C++	B-Language
and	O
Java	B-Language
.	O
</s>
<s>
When	O
a	O
feature	O
is	O
redefined	O
,	O
the	O
feature	O
name	O
is	O
kept	O
by	O
the	O
heir	O
class	O
,	O
but	O
properties	B-Language
of	O
the	O
feature	O
such	O
as	O
its	O
signature	O
,	O
contract	O
(	O
respecting	O
restrictions	O
for	O
preconditions	O
and	O
postconditions	O
)	O
,	O
and/or	O
implementation	O
will	O
be	O
different	O
in	O
the	O
heir	O
.	O
</s>
<s>
In	O
Java	B-Language
,	O
when	O
a	O
subclass	O
contains	O
a	O
method	B-Language
with	O
the	O
same	O
signature	O
(	O
name	O
and	O
parameter	O
types	O
)	O
as	O
a	O
method	B-Language
in	O
its	O
superclass	O
,	O
then	O
the	O
subclass	O
's	O
method	B-Language
overrides	B-Language
that	O
of	O
the	O
superclass	O
.	O
</s>
<s>
Class	O
represents	O
the	O
superclass	O
and	O
implements	O
a	O
method	B-Language
call	I-Language
.	O
</s>
<s>
The	O
subclass	O
called	O
inherits	O
every	O
method	B-Language
that	O
could	O
be	O
in	O
the	O
class	O
.	O
</s>
<s>
However	O
,	O
class	O
overrides	B-Language
the	O
method	B-Language
,	O
replacing	O
its	O
functionality	O
from	O
.	O
</s>
<s>
When	O
a	O
subclass	O
contains	O
a	O
method	B-Language
that	O
overrides	B-Language
a	O
method	B-Language
of	O
the	O
superclass	O
,	O
then	O
that	O
(	O
superclass	O
's	O
)	O
overridden	O
method	B-Language
can	O
be	O
explicitly	O
invoked	O
from	O
within	O
a	O
subclass	O
's	O
method	B-Language
by	O
using	O
the	O
keyword	O
.	O
</s>
<s>
(	O
It	O
cannot	O
be	O
explicitly	O
invoked	O
from	O
any	O
method	B-Language
belongings	O
to	O
a	O
class	O
that	O
is	O
unrelated	O
to	O
the	O
superclass	O
.	O
)	O
</s>
<s>
There	O
are	O
methods	O
that	O
a	O
subclass	O
cannot	O
override	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
in	O
Java	B-Language
,	O
a	O
method	B-Language
that	O
is	O
declared	O
final	O
in	O
the	O
super	O
class	O
cannot	O
be	O
overridden	O
.	O
</s>
<s>
In	O
Kotlin	B-Language
we	O
can	O
simply	O
override	B-Language
a	O
function	O
like	O
this	O
(	O
note	O
that	O
the	O
function	O
must	O
be	O
)	O
:	O
</s>
<s>
In	O
Python	B-Language
,	O
when	O
a	O
subclass	O
contains	O
a	O
method	B-Language
that	O
overrides	B-Language
a	O
method	B-Language
of	O
the	O
superclass	O
,	O
you	O
can	O
also	O
call	O
the	O
superclass	O
method	B-Language
by	O
calling	O
instead	O
of	O
.	O
</s>
<s>
In	O
Ruby	B-Language
when	O
a	O
subclass	O
contains	O
a	O
method	B-Language
that	O
overrides	B-Language
a	O
method	B-Language
of	O
the	O
superclass	O
,	O
you	O
can	O
also	O
call	O
the	O
superclass	O
method	B-Language
by	O
calling	O
super	O
in	O
that	O
overridden	O
method	B-Language
.	O
</s>
<s>
You	O
can	O
use	O
alias	O
if	O
you	O
would	O
like	O
to	O
keep	O
the	O
overridden	O
method	B-Language
available	O
outside	O
of	O
the	O
overriding	B-Language
method	B-Language
as	O
shown	O
with	O
'	O
super_message	O
 '	O
below	O
.	O
</s>
