Review

10/3/00


Click here to start


Table of Contents

Review

Inheritance

Syntax

An Example of Inheritance

HeaterController Super Class

Extending HeaterController

A VariableController Object

The Is-A Relationship

Is-A versus Has-A

Issues in Inheritance

Inappropriate Inheritance

Multiple Inheritance?

Downcasts and Upcasts

Inheritance for Specialization

Sub Class Initialization

Super Class Construction (cont.)

Default No-Arg Constructor

Access Control Issues

Access Control Rules

Overriding Methods

PPT Slide

Rules on Overriding

Method Selection

Selecting the Super Class Version of a Method

Usage of super

Restrictions on Overriding

Super Class Behavior and Overriding

Example

Final Classes and Methods

Author: David J. Barnes

Email: zhou@sci.brooklyn.cuny.edu

Home Page: www.sci.brooklyn.cuny.edu/~zhou