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吗? 比如:让汽车轮子成为汽车的子类是错误的。因为“汽车轮子”不是一个“汽车”。

原文地址:https://www.cnblogs.com/backpacker/p/2271557.html