软件设计原则(第二部分).ppt

  1. 1、本文档共49页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
软件设计原则(第二部分)

Software Design Principle Introduction Single Responsibility Principle (SRP) Open Closed Principle (OCP) Liskov Substitution Principle (LSP) Dependency Inversion Principle (DIP) Interface Segregation Principle (ISP) Least Knowledge Principle (LKP) Software Design Principle Introduction Single Responsibility Principle (SRP) Open Closed Principle (OCP) Liskov Substitution Principle (LSP) Dependency Inversion Principle (DIP) Interface Segregation Principle (ISP) Least Knowledge Principle (LKP) Barbara Liskov The first woman in the United States to be awarded a Ph.D. from a computer science department In 1968, Stanford University She received 2008 Turing Award from the ACM for her work in the design of programming languages and software methodology that led to the development of object-oriented programming ACM: Association for Computing Machinery The Turing Award The highest distinction in Computer Science The Nobel Prize of computing Definition Design by contract Behavioral subtyping Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T. Subtype A subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability Program constructs written to operate on elements of the supertype can also operate on elements of the subtype Typical program construct: subroutines, functions, methods Polymorphism in object-oriented programming language Subtyping relation is a relation on types On specification level More abstractly, on concepts Subclass A subclass is a class that inherits some properties from its superclass A subclass is an extension of its superclass A subclass reuses the properties or services of its superclass Subclass relation is a relation on implementation level superclass, base class, or parent class child classes, derived classes, or subclasses The principles (1) standard requirements on signatures Contravariance of method arguments

文档评论(0)

dajuhyy + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档