Abstract Class

Abstract Class

It may be tempting to represent the C++ notion of an abstract class by putting a cardinality constraint of 0 on a generalization object class. Doing so, however, will result in a useless OSA model. Since every object in a specialization object class must also be in the generalization object class, this effectively limits all specialization object classes to abstract classes, since they can not contain any objects. For more information on why this is the case, see Comparisons to other Generalization-Specialization models.

The real reason for an abstract class is to point out that any object that might fall into the class must actually be a member of one of the specialization classes. This is accomplished in OSA with the union specialization constraint. However, since C++ and most other object-oriented programming languages allow an object to be a member of only one class, the partition specialization constraint is actually OSA concept that is the most like an abstract class.

See also, a comparison between OSA and other models' Generalization/Specialization.


Go to the OSA Tutorial ORM


 OSM Home Page CS Dept Home Page  BYU Home Page


Last updated 27 Sept 1994 by Barry Roberts

(barry@parlant.com)