Wheels Doors Hood

Figure 2-2. Example of aggregation and decomposition.

The third abstraction principle is generalization. Generalization refers to the principle that considers construction of concepts by generalizing similarities existing in other concepts in the problem domain. Based on one or more given classes, generalization provides the description of more general classes that capture the common similarities of given classes. Specialization is the reverse operation of generalization. A concept A is a specialization of another concept B if A is similar to B and A provides some additional properties not defined in B.

Object-oriented languages provide support for generalization/ specialization as they allow for creating subclasses of exiting classes and/or creating more general classes (superclasses) of existing classes. Creating a subclass of an existing class corresponds to specialization and creating a superclass of an existing class corresponds to generalization. It is important to note that concept A is a generalization of concept B if and only if B is a specialization of concept A [Ped89]. Figure 2-3 shows an example of generalization and specialization.

Generalization and Specialization

Truck Tractor

6 Cylinder 8 Cylinder

Figure 2-3. Example of generalization and specialization.

Concept Truck is a specialization of concept Vehicle. This is because Truck has all the properties of concept Vehicle and some additional ones that make it a special Vehicle. In reverse, concept Vehicle is a generalization of concept Truck, as all trucks are vehicles.

The fourth abstraction and perhaps the least obvious, is grouping [Tai96]. In conceptual modeling, often a group of concepts needs to be considered as a whole, not because they have similarities but because it is important that they be together for different reasons. Object-oriented languages provide a mechanism for grouping concepts together such as sets, bags, lists, and dictionaries. Individualization is the reverse operation of grouping. It consists of identifying an individual concept selected among other concepts in a group. Individualization is not as well established as a form of abstraction [Tai96]. Figure 2-4 shows an example of grouping and individualization.

Grouping and Individualization


Was this article helpful?

0 0

Post a comment