Polymorphism & Dynamic Binding

Classes and Interfaces

Aquarium Example

Imagine that the aquarium in the Aquarium Lab Series could hold more than just fish. To simplify processing, we could create an abstract type (interface) for an AquariumObject that specifies the following methods:

Classes that could implement the AquariumObject interface might include:

Alyce Brady, Kalamazoo College