FeaturesWhen asked for the fundamentals of OO, people often reply with a list of features provided by object-oriented programming languages, instead of what OO is truely about. Features mentioned are classification, inheritance, polymorphism, encapsulation, abstraction. For OO these features are irrelevant, apart from abstraction but the term is wrongly used here. To describe OO in terms of features provided by programming languages that support OO leads to the conclusion that for a programming language to be OO, it has to support these features. This circular reasoning is certainly not helpful for a good understanding of what OO is truely about.
Emphasis on the features of object-oriented programming languages, such as classification, inheritance, and polymorphism, leads to specification of data objects and distracts from the OO concepts of behaviour abstraction. Also, on higher levels of abstraction in design there is less need for these features, with as result that the design is directly done on the level of programming. It seems that the use of features provided by object-oriented programming languages has become the goal.
Abstraction and GeneralizationThere is a lot of confusion over abstraction and generalization, or rather, they are interchanged. But abstraction and generalization are definitely not the same. With abstraction some detail is left out that is considered not important in a description on a higher level of abstraction. With generalization that detail is not left out, but described in a general way on the same level of abstraction.
Consider the following example where we have a red, green, and blue object. We can describe these objects in general terms of an object with a particular color. With abstraction we describe these objects as an object without mentioning of the color at all.
Encapsulation and Information HidingEncapsulation and information hiding are often interchanged or used with the same meaning. Encapsulation of an object prevents communication with that object in other ways than the defined ones and does not hide how an object does things. Information hiding makes it impossible to see how an object does things, but does not prevent communication with that object in certain ways.
DescriptionObjects are often described in terms of data and a set of functions. The Unified Modelling Language (UML) is advocated as a language for this in all phases of software development. With the description of objects in terms of data and functions, UML hardly rises from the level of object-oriented programming languages. Although the details of data and functions are left out, there is no abstraction from the implementation of objects. This way of describing objects are thus useless on higher levels of abstraction in software design. Objects should be described by their behaviour, instead of in terms of data and functions.