I've always been a little wary about polymorphism and still don't think I understand the concept to the fullest.
I understand polymorphism as an object can take many forms. So an object can be one form then be another?
Mammal (base class) cat (subclass of mammal) supercat (subclass of cat)
Cat newCat = new Cat();
Now I want the cat to be a supercat, is this "Polymorphism"?
SuperCat supCat = (SuperCat)newCat;
Isn't this just like casting? When do you want to use casting? Is the above line of code valid? So newCat gets transformed to Supercat, does it give newCat more memory allocation? Then copies it into supCat?
NOTE -- Polymorphism is the use of interfaces?