Polymorphism decouples your classes by isolating structure from implementation: If class Foo manipulates a List it doesn't know how that list is implemented.
This is an example of proper encapsulation.
This is the polymorphism portion. There's no confusion on my end. I am not the one claiming that:
"The value of polymorphism lies in the ability to define and use attributes and behaviors without having to know about the details of how those attributes and behaviors are implemented."
is not encapsulation. It is encapsulation.
Now, if it were said that "The value of polymorphism lies in the ability to substitute one TYPE with another, knowing that both have promised to provide the correct results for that type."
Then I'd agree that it is polymorphism, but the design and use of a class without needing to know its internals or how they work is encapsulation, and nothing can ever change that.
This post has been edited by farrell2k: 29 April 2013 - 01:26 PM