Title: More Polymorphic Examples
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- More Polymorphic Examples lecture video (Time: 24:00)
- More Polymorphic Examples document

- Example: Shape example again, but this time we create a simple drawing program for ovals and rectangles. We make the Shape class abstract.
- Example: MakeMusic.java an example using an abstract class. Note that we can specify an array of abstract classes even though we cannot construct the abstract class MakeMusic
- Example: MakeMusic.java recast to use interfaces. Note that we now have a Singer class derived from Person which also implements the MakeMusic interface. Note that we can specify an array of objects which implement MakeMusic