Inheritance
This section is based on part 16 of the notes,
Extended drinks machines.
Practical exercises supporting this section are in
Exercise sheet 7.
When you have completed this section you should be able to:
- Write Java classes which add extra methods to existing Java
classes using inheritance
- Write Java classes which extend existing classes by changing the
behaviour of their methods using inheritance
- Understand how the superclass-subclass relationship means an
object may have more than one type in Java
- Know what is meant by "dynamic binding" and how this indicates what
code is used when a method is called on an object
Matthew Huntbach
Last modified: 3 July 2006