Write tests in a "just-in-time" fashion, when you find the need to modify a class that doesn't have good (or any) tests.
当您发现有必要对一个未经很好测试(或者根本就没有测试)的类进行修改时,请“随时”编写测试。
The disadvantage of using instanceof checks in this fashion is that, if we were to add another subclass of Tree (such as, a LeafWithValue class), we would have to revise these instanceof checks.
以这种方式使用instance of检查语句的一个缺点是,如果我们要添加Tree的另一个子类(比如一个leafwithvalue类),我们将不得不修改这些instance of检查语句。
In order to do this in a useful fashion we need to have a mechanism to describe the classes that individuals belong to and the properties that they inherit by virtue of class membership.
为了在一种有效的方式下做到这一点,我们需要一种机制来描述个体所属的类以及这些个体通过类成员关系而继承得到的属性。
In real life, Yang Mian is a fashionable youth, with middle-class sensibilities and graceful behavior. Therefore his irony and criticism on fashion have a sense of sympathy, pity or even appreciation.
在现实生活中,杨冕是一个时尚青年,穿戴中产,举止优雅,所以他对时尚的嘲讽和批判是带着同情和怜悯的,有时甚至还是欣赏的。
In real life, Yang Mian is a fashionable youth, with middle-class sensibilities and graceful behavior. Therefore his irony and criticism on fashion have a sense of sympathy, pity or even appreciation.
在现实生活中,杨冕是一个时尚青年,穿戴中产,举止优雅,所以他对时尚的嘲讽和批判是带着同情和怜悯的,有时甚至还是欣赏的。
应用推荐