Animal is a superclass
Feline is a subclass of Animal
Cat is a subclass of Feline
Canine is a sublcass of Animal
Dog is a subclass of Canine
All of the classes have their own eat() method that outputs:
"(class) is eating"
I've already tried creating an array of Animals, looping through them, and calling the eat() method, which outputs the proper output for each given animal.
My question is, what does one gain by doing this:
Animal j = new Cat();
wouldn't Cat j = new Cat()
do anything you need do regarding methods with Animal types, since it's already an animal through inheritance?