Rule of “extends”

when to select “extends”?
Is “B” an “A”? If yes, let “B” be the subclass of “A”.
B是一个A吗? 如果是,则让B做A的子类。

Common mistake:
A有一个B吗? 比如:让汽车轮子成为汽车的子类是错误的。因为“汽车轮子”不是一个“汽车”。

posted @ 2011-12-02 07:43  allenbackpacker  阅读(113)  评论(0编辑  收藏  举报