For object-oriented programming languages, polymorphism is the third most basic feature (the first two are data abstraction and inheritance.) ”
"Polymorphism" separates the interface from the concrete implementation details from another angle, i.e., the separation of "what is" and "How to Do" two modules. Using the concept of polymorphism, the organization of code and readability can be improved. In addition, you can create "easy to extend" programs. They can be easily "grown" both during project creation and when new features need to be added.
Encapsulation technology creates new data types by incorporating various features and behaviors. By hiding the details of the implementation, the interface can be separated from the implementation details to make all the details "private" (private). This organization makes it comfortable for those who have programmed programming backgrounds. But polymorphism involves the decomposition of "type". By learning from the previous chapter, you know that by inheriting you can treat an object as its own type or its own base type. This ability is important because multiple types (derived from the same underlying type) can be treated as one of the same types. And with just a piece of code, you can do the same for all the different types. Using a method invocation with polymorphism, one type can separate itself from another similar type, as long as they are derived from the same underlying type. This distinction is achieved through the differences in behavior of various methods, and the invocation of those methods can be implemented through the underlying classes.
In this chapter, you need to learn more about the problem of polymorphism (also called dynamic binding, deferred binding, or run-time binding). At the same time, give some simple examples where all the extraneous parts have been stripped and only the code related to the polymorphism is retained.