Class Instances: Objects
- While classes are abstractions, instances of classes (objects) make up
a running object-oriented program.
- Objects are like virtual computers realized in software; they have both
state (data) and behavior (operations).
- A main principle of OOP:
A particular object is an instance of all the classes in its ancestry.
Therefore, a particular Oxford shirt is an instance of the
OxfordShirt and Item classes.
- This principle accounts for an
operation's being "generic" (applicable to
many types) or in the parlance of OOP, polymorphic.