

A computer game might consist of klingons, monsters, and vulcans. Although each of these objects may behave differently they all belong to a larger class called alien.
All objects in the alien class have attributes in common (e.g. they all use spaceships to fly around the galaxy) and perform common operations (e.g. try to kill you).
By categorizing a klingon as a member of the alien class we know something about it's attributes and operations.
Each instance of the class, has its own value for each attribute but shares the attribute names and operations with other instances of the class.
Each attribute name is unique within a class (as apposed to being unique across all classes) so class Person and class Company may each contain an attribute called Address
| << Objects | Encapsulation >> |