An
AbstractClass is a class that represents abstract concepts for which objects cannot exist. (paraphrased from
BjarneStroustrup)
All classes are either Abstract or Concrete. Instances of abstract classes cannot be created. Instances of concrete classes can be created.
There are generally two uses for abstract classes:
interfaces, and
building blocks. (concepts from Stroustrup)
Abstract classes with no implementation are useful for defining the
interface to a set of classes, the "contract" between the user and implementation of some functionality. These interface classes are often found at the top of class hierarchies.
Abstract classes with
some implementation are useful as
building blocks, and are often found in the middle of class hierarchies. They often contain common functionality that has been pushed up from concrete classes, but they are still
incomplete - they need to be derived and finished before instances of them can be created.
See
http://st-www.cs.uiuc.edu/users/hanmer/PLoP-97/Proceedings/woolf.pdf
CategoryPolymorphism CategoryAbstraction