A specialized class used solely for subtyping. It defines a common set of behaviors to be inherited by its subtypes. It has no instances. (Synonymous with Virtual Class in C++).
Source: Firesmith, D, Eykholt, E (1995), Dictionary of Object Technology, Sigs Books, New York, NY, ISBN 0133738876.
In Java if a class is defined as
abstract then the class can not be instanced, it can only be subclassed. If a method is defined as
abstract then the subclass must provide implementation of the method, otherwise you get a compile time error.
In VFP we have no real way of enforcing this. Init() could return .f. to prevent instantiation, but that really causes problems of either not using dodefault() in the Concrete Class subclass or throwing away its return value.
You can use a class naming convention that would indicate the abstract nature of the class.
Category Definitions Category OOPrinciples
( Topic last updated: 2000.08.18 03:48:34 PM )