Chap 7 - Inheritance

12/18/01


Click here to start


Table of Contents

Chap 7 - Inheritance

An example from Zoology

An example from java.lang

Other terms from inheritance

PPT Slide

PPT Slide

PPT Slide

PPT Slide

Subtype Principle

Which toString() gets called?

Can't use Student fields from Person reference

Overriding vs Overloading

Dynamic Method Dispatch

PPT Slide

Dynamic Method Dispatch

PPT Slide

Access Modifiers, Method Overriding and the Subtype Principle

Generic Methods

Method equals() in Object

PPT Slide

PPT Slide

When equals are not equal?

PPT Slide

Primitive Wrapper Classes

A Generic Numeric Method

Abstract Classes

PPT Slide

PPT Slide

PPT Slide

Predator-Prey: An abstract class

Pseudocode for Predator-Prey

PPT Slide

Counting Neighbors

PPT Slide

PPT Slide

PPT Slide

PPT Slide

Interfaces

PPT Slide

PPT Slide

Multiple Inheritance

Multiple Inheritance

implements vs extends

PPT Slide

PPT Slide

PPT Slide

PPT Slide

Can't instantiate an interface

instanceof

Illegal Cast

ClassCastException

PPT Slide

PPT Slide

Author: Charlie McDowell

Email: charlie@cs.ucsc.edu

Home Page: http://www.cse.ucsc.edu/~charlie