Base class

from Wikipedia, the free encyclopedia

As a base class , upper class , super class (of English superclass ) superclass or parent class (v. Engl. Parent class ) is called in the object-oriented programming classes , their attributes and methods of derived classes inherit.

In particular, the term base class is sometimes intended to make it clear that it is the starting point for further classes derived from it and at the same time has no base classes of its own, which then means that the base class is always the highest, in the sense of top-down , defined class in its class hierarchy . But there can also be more than one base class, which then result in a network of subclasses independently of one another. Such a systematic collection is also called a class library .

A base class can also be declared as an abstract base class (abbreviated as ABC ) and in this case forbid the direct instantiation of abstract classes. It then only serves to summarize and abstract the attributes and methods of the classes derived from it.

Individual evidence

  1. a b Bjarne Stroustrup: The C ++ programming language . 2nd Edition. Addison-Wesley, Bonn 1992, ISBN 3-89319-386-3 , p. 27 (English: The C ++ programming language, second edition, reprinted with corrections . Translated by Elke Kasimir).
  2. a b Scott Meyers: Programming C ++ Effectively: 50 Ways to Improve Your Programs . 2nd Edition. Addison-Wesley, Bonn 1995, ISBN 3-89319-816-4 , pp. 158 (Original title: Effective C ++ - 50 Specific Ways to Improve Your Programs and Design . Translated by Elke Kasimir).
  3. ^ A b Rebecca Wirfs-Brock, Brian Wilkerson, Lauren Wiener: Object-oriented software design . Hanser, Munich 1993, ISBN 3-446-16319-0 , p. 26 .
  4. James Rumbaugh: Object-Oriented Modeling and Design . Hanser, Munich 1993, ISBN 3-446-17520-2 , p. 48 .
  5. a b Bernd Oestereich: Object-oriented software development with the Unified Modeling Language . 3. Edition. Oldenbourg, Munich 1997, ISBN 3-486-24319-5 , p. 274 .
  6. a b c Christian Ullenboom: Java is also an island. Galileo Computing, 2009, ISBN 978-3-8362-1371-4 , Chapter 6.8.1 Inheritance in Java.