// 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

ClientClass.java

B.     Sample Output Screen: