By adding a wrapper class, you have broken subtype polymorphism.
通过添加包装程序类,您打破了子类型的多态性。
Anyway, this section talks about UML and class diagrams, inheritance, polymorphism, encapsulation... things they should have shown you in the beginning.
总之,该部分讨论了UML和类图、继承、多态性、封装…一些应该在开头为您介绍的东西。
As I said earlier, the most common manifestation of the Open Closed Principle is using polymorphism to substitute an existing part of the application with a brand new class.
如果我前面所说的,使用开闭原则最通常的做法就是使用多态去用一个全新的类替换程序中现存的一部分。
应用推荐