Chapter Summary
- An override occurs when a method in the child classes uses the same
name and type signature as a method in the parent class.
- Unlike overloading, overriding is resolved at run-time.
- There are two possible means for an overriding, replacement and
refinement.
- A name can shadow another name. Some languages permit both shadowing
and overriding. Shadowing is resolved at compile time.
- A change in the type signature can be covariant or contravariant,
if it moves down or up the type hierarchy.
The semantics of both types of change can be subtle.
Intro OOP, Chapter 16, Slide 25