IS-A is expressed with the keyword extends.
HAS-A means an instance of one class "has a" reference to another class.
All classes (except class Object), are subclasses of type Object, and therefore they inherit Object's methods.
Polymorphism means "many forms."
IS-A is based on class inheritance or interface implementation.
HAS-A relationships are based on usage, rather than inheritance.
|