首页> 外文会议>World multiconference on systemics, cybernetics and informatics;SCI 2000 >Can Conflicts Between the Substitution Principle and the Inheritance Mechanisms be Resolved
【24h】

Can Conflicts Between the Substitution Principle and the Inheritance Mechanisms be Resolved

机译:可以解决替代原则与继承机制之间的冲突

获取原文

摘要

The Liskov Substitution Principle (LSP) is a powerful tool to ensure compatibility of subclasses with superclasses. When applied, it leads to more correct inheritance hierarchies that are easy to understand and extend. In its simplest form, the LSP states that an object of a subclass can be supplied wherever an object of its superclass is expected. However, the LSP sometimes prevents legitimate inheritance hierarchies. We show that a number of real-world class derivations don't satisfy the LSP. This article discusses the implications of this general principle on the different parts of a class definition. It pinpoints the language mechanisms that conflict with this principle. This article will try to answer the question whether or not the LSP is an adequate tool to guarantee good class hierarchies. It further presents some recommendations on how this principle could be best supported by an object-oriented language. For explanatory purposes, we will use both the Java and the Eiffel programming languages.
机译:Liskov替代原理(LSP)是一种功能强大的工具,可确保子类与超类的兼容性。当应用时,它会导致更易于理解和扩展的更正确的继承层次结构。 LSP以其最简单的形式表示,子类的对象可以在期望其超类的对象的任何位置提供。但是,LSP有时会阻止合法的继承层次结构。我们表明,许多现实世界中的类推导不满足LSP。本文讨论了该通用原则对类定义的不同部分的影响。它指出了与此原则相冲突的语言机制。本文将尝试回答LSP是否足以保证良好的类层次结构的问题。它还就如何用面向对象的语言最好地支持该原理提出了一些建议。为了说明起见,我们将同时使用Java和Eiffel编程语言。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号