Polymorphism Lecture

To Read

  • Section 9.1-9.2 of A First Course in Object Oriented Development.

Recording, Part 1

The same exception was by mistake included several times in the throws clause written at the end of part one. This is corrected in the beginning of part two.

Polymorphism Lecture, Part 1

Content, Part 1

00:00 Definition of polymorphism
01:59 Polymorphism example, the program before introducing polymorphism
06:34 Polymorphism example, find the public interface
09:46 Polymorphism example, extract an interface
21:19 Polymorphism example, class diagram
22:22 Polymorphism example, remove the dependency of the implementation
28:57 Polymorphism example, how to change implementation during excecution
37:05 When to use polymorphism?
40:13 How to load a class file during execution (bonus content, not part of the course)

Recording, Part 2

Polymorphism Lecture, Part 2

Content, Part 2

00:00 Introduction to the polymorphism exercise
02:06 The code for the exercise
04:19 Polymorphism exercise, find the public interface
12:00 Polymorphism exercise, class diagram
21:03 Polymorphism exercise, communication diagram
28:28 Polymorphism exercise, code

Solutions to Exercises

Here are NetBeans projects with the code that was written during the lecture.

Here's the astah project that was created during the lecture, polym-exe.asta Download polym-exe.asta