ITWissen.info - Tech know how online

abstract class

An Abstract Class is a class that specifies common features of its subclasses without including all implementations. For this purpose, an Abstract Class contains one or more method declarations for which no implementation is specified. Therefore, instances of Abstract Classes cannot be created.

Subclasses of abstract classes complete the class definition by the missing implementations of the methods and define possibly further characteristics. Characteristics are the generic term for the characteristic properties of an object, i.e. its attributes and methods.

For the software design and the project management classes are interesting, which must not be implemented completely and therefore also no instances may have - these are so-called abstract classes. With these classes on the one hand implementation parts, which appear redundantly in several classes, can be summarized and then inherited. On the other hand a minimum protocol (these are the methods), which is to be obligatory for all classes of a group, can be specified and bequeathed to these. In this connection also the different visibility and access protection mechanisms are to be mentioned. Their combination of the different views on classes and objects permit many variants of the data encapsulation.

With the help of the abstract class as common base class "similar" classes can be brought into an "artificial" class hierarchy. Thus the application type of the Polymorphie, which is limited in statically typed languages to the use of instances on subclasses, is extended.

Informations:
Englisch: abstract class
Updated at: 23.11.2009
#Words: 236
Links: class, method, implementation, class definition, object (O)
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2022