Object-Oriented Programming with Java Lecture Notes

19 February 2008 • Inheritance


Outline

Programs

Method Calls

Class Protocol

The IS-A Relation

IS-A Example

IS-A Abstraction

Implementing IS-A Relations

The Inheritance Relation

Why Inheritance?

Method Overriding

Overriding Methods

Class Compatability

Compatability Example

Static and Dynamic Types

Type Example

Testing Dynamic Types

Which Method?

Method Look-Up

Method Look-Up Matching

Look-Up Example

Controlling Look-Up

Inheritance Problems

Example.

Example..

Example...

Example....

Preventing Inheritance

Final Overload


This page last modified on 22 February 2008.

This work's CC license.