【问题标题】:Class inheritance versus Interface inheritance类继承与接口继承
【发布时间】:2016-12-11 13:43:08
【问题描述】:

类继承和接口继承有什么区别?以上哪项会产生较低的耦合和较高的内聚..

【问题讨论】:

    标签: theory metrics code-metrics


    【解决方案1】:

    类继承更多的是is a,所以SquareShape,而接口更多的是has the ability of,所以SquareResizable的能力。但正如您所说,您可以使用接口继承来结合多种功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-10
      • 2016-01-05
      • 1970-01-01
      • 2013-02-25
      • 1970-01-01
      • 2021-09-12
      相关资源
      最近更新 更多