📜  oop 的 4 个基础是什么 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:09.308000             🧑  作者: Mango

代码示例1
1. Abstraction is the principle that allows to express only main features, 
 hiding the details.
 2. Inheritance shows the hierarchical relationship between classes and objects.
 3. Polymorphism is the principle showing that certain object can be expressed
 in variety of different ways.
 4. Encapsulation is the principle that allows to hide unnecessary details
 making a program code easier.