September 2004
Beginner
528 pages
10h 26m
English
To be most useful, objects need independence. Each should act as though it were a miniature computer that can send and respond to messages. As long as a new object type uses the appropriate interface, you should be able to plug it into existing software.
Literally, polymorphism means “many forms.” On the most basic level, it means the ability to implement the same operation multiple ways. Stated that way, it’s trivial. But the real point is this: without changing anything about the code that uses an object, you can substitute another object type and the program will still work.
Consider an analogy. Your word processor can successfully interact with any kind of printer you purchase. You can even, five years ...
Read now
Unlock full access