What Is an Abstract Class?
Abstract classes are often used to represent abstract concepts derived from the analysis and design of problem areas. They are abstractions of a series of concrete concepts that look different but are essentially the same.
- in
- In object-oriented methods, abstract classes are mainly used for type hiding. An abstract description of a fixed set of behaviors is constructed, but this set of behaviors can have any number of possible specific implementations. This abstract description is an abstract class, and any set of possible concrete implementations is represented by all possible derived classes. A module can operate on an abstract body. Because the module depends on a fixed abstract body, it can not be modified; at the same time, by deriving from this abstract body, the behavioral function of this module can also be extended. In order to realize one of the core principles of OCP (Open-Closed Principle), abstract classes are the key. [1]