If fields make sense for one subclass but not the other, you can remove them from the superclass and push them down into the subclass they belong to.
如果一些字段对于某个子类有意义,但是对于其他子类没有意义,就可以把它们从超类中删除,并放到它们所属的子类中。
Qualified subclass name: name subclasses to communicate the similarities and differences with a superclass.
子类名称要合格:对子类的命名会表述出其与超类之间的相似和差异之处。
Every class you define is a subclass of owl: thing and a superclass of owl: Nothing.
您所定义的每个类都是owl:thing的子类,并且是owl:Nothing的超类。
That is, how a subclass can inherit fields and methods from a superclass.
这就是,一个子类从超类中继承属性和方法。
A class that passes properties and methods to another class is called a superclass. A class can be both a subclass and a superclass.
一个超越其他类别的类别被称为超级类别,一个类别可以既是最高类别又是超级类别。
A class that passes properties and methods to another class is called a superclass. A class can be both a subclass and a superclass.
一个超越其他类别的类别被称为超级类别,一个类别可以既是最高类别又是超级类别。
应用推荐