Abstract Classes

Abstract classes cannot be instantiated directly. They do not give birth to objects, but may be used as a more general specification — of type — in order to manipulate objects that are instances of one (or more) of their subclasses.

Abstract classes form a basis for extensible software applications. The set of general mechanisms is described according to the specifications of the abstract classes, without taking into account specific features gathered within concrete classes. New requirements, extensions and improvements are gathered into new subclasses, and the objects resulting from these subclasses may be manipulated transparently by mechanisms that are already in place.

A class is specified as abstract using the Boolean property

Abstract
, which is defined for all elements that may be generalized (types, packages and stereotypes). By convention, the names of abstract classes are italicized.

The

Abstract
property may also be applied to an operation to indicate that the body of the operation must be defined explicitly in subclasses.

© 1997 Editions, Eyrolles, Paris, France . All rights reserved.