// source: Revised from source codes available at http://www.artima.com/javaseminars/modules/PolymorphInt/index.html.

A.     Source files:

Animal.java                        Dog.java                             Cat.java

ClientClass2.java

B.     Sample Output Screen: