欢迎来到课桌文档! | 帮助中心 课桌文档-建筑工程资料库
课桌文档
全部分类
  • 党建之窗>
  • 感悟体会>
  • 百家争鸣>
  • 教育整顿>
  • 文笔提升>
  • 热门分类>
  • 计划总结>
  • 致辞演讲>
  • 在线阅读>
  • ImageVerifierCode 换一换
    首页 课桌文档 > 资源分类 > PPT文档下载  

    软件工程Ch11.ppt

    • 资源ID:235689       资源大小:422KB        全文页数:24页
    • 资源格式: PPT        下载积分:10金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要10金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    软件工程Ch11.ppt

    1,Chapter 11Component-Level Design(构件设计),2,What is a Component?,OMG Unified Modeling Language Specification OMG01 defines a component as“a modular,deployable,and replaceable part of a system that encapsulates implementation and exposes a set of interfaces.”(一个封装了实现细节而向外提供了一系列接口的可被布置和替代的模块)OO view(面向对象观点):a component contains a set of collaborating(协作)classesConventional view(常规观点):logic(逻辑的),the internal data structures that are required to implement the processing logic,and an interface that enables the component to be invoked and data to be passed to it.(内部数据结构要实现处理逻辑,接口允许部件被调用及进行数据传递),3,OO Component,4,Conventional Component,5,Basic Design Principles,The Open-Closed Principle(OCP).“A module component should be open for extension but closed for modification.(对外可扩展,对内不修改)The Liskov Substitution Principle(LSP).“Subclasses should be substitutable for their base classes.(子类能代替基类)Dependency Inversion Principle(DIP).“Depend on abstractions.Do not depend on concretions.”(依赖抽象,不依赖具体)The Interface Segregation Principle(ISP).“Many client-specific interfaces are better than one general purpose interface.(对某些客户专用的界面比通用界面好)The Release Reuse Equivalency Principle(REP).“The granule of reuse is the granule of release.”(复用的粒度就是发布的粒度)The Common Closure Principle(CCP).“Classes that change together belong together.”(共同封原则:一同变更的类应该打包在一起)The Common Reuse Principle(CRP).“Classes that arent reused together should not be grouped together.”(共同利用原则:不一起利用的类不放在一个分组内),6,Design Guidelines,ComponentsNaming conventions should be established for components that are specified as part of the architectural model and then refined and elaborated as part of the component-level model(命名方式应该是作为体系结构模型的一个部分,并对其做进一步的精化)Interfaces Interfaces provide important information about communication and collaboration(as well as helping us to achieve the OPC)接口提供关于通讯和协作的重要信息,7,Cohesion(内聚),Conventional view:the“single-mindedness”of a module(专诚性)OO view:cohesion implies(暗指)that a component or class encapsulates only attributes and operations that are closely related to one another and to the class or component itselfLevels of cohesionFunctional(功能性)Layer(层)Communicational(通讯)Sequential(顺序)Procedural(过程)Temporal(暂时)Utility(实用),These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,8,Coupling(耦合),Conventional view:The degree(程度)to which a component is connected to other components and to the external worldOO view:a qualitative(定性的)measure of the degree to which classes are connected to one anotherLevel of couplingContent(内容)Common(共用)Control(控制)Stamp(印记)Data(数据)Routine call(例程调用)Type use(类型使用)Inclusion or import(包含或导入)External(外部),These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,9,Component Level Design-I,Step 1.Identify all design classes that correspond to the problem domain.Step 2.Identify all design classes that correspond to the infrastructure domain.Step 3.Elaborate all design classes that are not acquired as reusable components.Step 3a.Specify message details when classes or component collaborate.Step 3b.Identify appropriate interfaces for each component.,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,10,Component-Level Design-II,Step 3c.Elaborate attributes and define data types and data structures required to implement them.Step 3d.Describe processing flow within each operation in detail.Step 4.Describe persistent data sources(databases and files)and identify the classes required to manage them.Step 5.Develop and elaborate behavioral representations for a class or component.Step 6.Elaborate deployment diagrams to provide additional implementation detail.Step 7.Factor every component-level design representation and always consider alternatives.,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,11,Collaboration Diagram,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,12,Refactoring,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,13,Activity Diagram,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,14,Statechart,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,15,Object Constraint Language(OCL),complements UML by allowing a software engineer to use a formal grammar and syntax to construct unambiguous statements about various design model elementssimplest OCL language statements are constructed in four parts:(1)a context that defines the limited situation in which the statement is valid;(2)a property that represents some characteristics of the context(e.g.,if the context is a class,a property might be an attribute)(3)an operation(e.g.,arithmetic,set-oriented)that manipulates or qualifies a property,and(4)keywords(e.g.,if,then,else,and,or,not,implies)that are used to specify conditional expressions.,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,16,OCL Example,context PrintJob:validate(upperCostBound:Integer,custDeliveryReq:Integer)pre:upperCostBound 0 and custDeliveryReq 0 and self.jobAuthorization=no post:if self.totalJobCost=upperCostBound and self.deliveryDate=custDeliveryReq then self.jobAuthorization=yes endif,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,17,Algorithm Design,the closest design activity to codingthe approach:review the design description for the componentuse stepwise refinement to develop algorithmuse structured programming to implement procedural logicuse formal methods to prove logic,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,18,Stepwise Refinement,open,walk to door;,reach for knob;,open door;,walk through;,close door.,repeat until door opens,turn knob clockwise;,if knob doesnt turn,then,take key out;,find correct key;,insert in lock;,endif,pull/push doormove out of way;,end repeat,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,19,Algorithm Design Model,represents the algorithm at a level of detail that can be reviewed for qualityoptions:graphical(e.g.flowchart,box diagram)pseudocode(e.g.,PDL).choice of manyprogramming languagedecision tableconduct walkthrough to assess quality,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,20,Structured Programmingfor Procedural Design,uses a limited set of logical constructs:,sequence,conditional,if-then-else,select-case,loops,do-while,repeat until,leads to more readable,testable code,important for achieving high quality,but not enough,can be used in conjunction with proof of correctness,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,21,A Structured Procedural Design,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,22,Decision Table,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,23,Program Design Language(PDL),These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,24,Why Design Language?,

    注意事项

    本文(软件工程Ch11.ppt)为本站会员(夺命阿水)主动上传,课桌文档仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知课桌文档(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-1

    经营许可证:宁B2-20210002

    宁公网安备 64010402000986号

    课桌文档
    收起
    展开