Abstract classes can be created, signified, or simulated in several ways:
By default, all methods in all classes are concrete, unless the abstract keyword is used. An abstract class may include abstract methods, which have no implementation. By default, all methods in all interfaces are abstract, unless the default keyword is used. The default keyword can be used to specify a concrete method in an interface.
Abstract types are an important feature in statically typed OOP languages. Many dynamically typed languages have no equivalent feature (although the use of duck typing makes abstract types unnecessary); however traits are found in some modern dynamically-typed languages.
Some authors argue that classes should be leaf classes (have no subtypes), or else be abstract.56
Abstract types are useful in that they can be used to define and enforce a protocol; a set of operations that all objects implementing the protocol must support.
Abstract types are also an essential part of the Template Method Pattern.
Mitchell, John C.; Plotkin, Gordon D.; Abstract Types Have Existential Type, ACM Transactions on Programming Languages and Systems, Vol. 10, No. 3, July 1988, pp. 470–502 http://theory.stanford.edu/~jcm/papers/mitch-plotkin-88.pdf ↩
"Abstract Methods and Classes (The Java Tutorials > Learning the Java Language > Interfaces and Inheritance)". Oracle.com. Retrieved 2019-08-14. https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html ↩
"Pure Virtual Functions and Abstract Classes in C++". GeeksforGeeks.org. 15 July 2014. https://www.geeksforgeeks.org/pure-virtual-functions-and-abstract-classes/ ↩
Riel, Arthur (1996). Object-Oriented Design Heuristics. Addison-Wesley Professional. p. 89. ISBN 0-201-63385-X. 0-201-63385-X ↩
Meyers, Scott (1996). More Effective C++. Addison-Wesley Professional. p. 258. ISBN 0-201-63371-X. Make non-leaf classes abstract 0-201-63371-X ↩