




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Elaboration Iteration 1-Design ModelCh15. UML Interaction DiagramsCh16. UML Class Diagrams 1Chapter 15. UML Interaction DiagramsObjectivesProvide a reference for frequently used UML interaction diagram notation(sequence and communication diagrams).2Sequence and Communication Diagrams The UML include
2、s interaction diagrams to illustrate how objects interact via messages. They are used for dynamic object modeling.3Strengths and Weaknesses of Sequence vs. Communication Diagrams4Example Sequence Diagram: makePayment5Example Communication Diagram: makePayment6Novice UML Modelers Dont Pay Enough Atte
3、ntion to Interaction Diagrams !Most UML novices are aware of class diagrams and usually think they are the only important diagram in OO design. Not true! Although the static-view class diagram are indeed useful, the dynamic-view interaction diagrams are incredibly valuable. Spend time doing dynamic
4、object modeling with interaction diagrams, not just static object modeling with class diagrams.7Common UML Interaction Diagram NotationIllustrating Participants with Lifeline Boxes8Basic Message Expression SyntaxSingleton Objects9Basic Sequence Diagram NotationMessages and focus of control with exec
5、ution specification bar10Illustrating Reply or Returns11Messages to self or this“Creation of Instances12Object Lifelines and Object Destruction13Diagram Frames in UML Sequence Diagrams14common frame operators15Conditional Messages16UML 1.x notational simple styleMutually Exclusive Conditional Messag
6、es17Iteration Over a Collection18Iteration over a collection using relatively explicit notationIteration Over a Collection19Iteration over a collection leaving things more implicitIteration Over a Collection20Nesting of Frames21How to Relate Interaction Diagrams?22Messages to Classes to Invoke Stati
7、c (or Class) Methods23Polymorphic Messages and Cases24Asynchronous and Synchronous Calls25Asynchronous and Synchronous Calls26Basic Communication Diagram NotationLinksMessages27Messages to self or this28Creation of Instances29Message Number Sequencing3031Message Number SequencingConditional Messages
8、32Mutually Exclusive Conditional Paths33Iteration or Looping34Iteration Over a Collection35Messages to a Classes to Invoke Static (Class) Methods36Polymorphic Messages and Cases37Asynchronous and Synchronous Calls38Chapter 16. UML Class DiagramsObjectivesProvide a reference for frequently used UML c
9、lass diagram notation.39Applying UML: Common Class Diagram Notation40Definition: Design Class Diagram411. Definition: ClassifierA UML classifier is “a model element that describes behavioral and structure feature”. Classifier can also be specialized. They are a generalization of many of the elements
10、 of the UMLClasses Interfaces Use cases Actors In class diagram, the two most common classifier are regular classes and interfaces422. Ways to Show UML Attributes: Attribute Text and Association Lines43Idioms in association notation usage in different perspectives44Guideline: When to Use Attribute T
11、ext versus Association Lines for Attributes?45How to Show Collection Attributes with Attribute Text and Association Lines?463. Note Symbols: Notes, Comments, Constraints, and Method BodiesNote symbols can be used on any UML diagram, but are especially common on class diagrams A UML note symbol is di
12、splayed as a dog-eared rectangle with a dashed line to be annotated element; A note symbol may represent several things a UML note or comment, having no semantic impact a UML constraint, must be encased in braces a method body474. Operations and MethodsOne of the compartments of the UML class box sh
13、ows the signature of operationsOperations are usually assumed public if no visibility is shown An operation is not a method. It is a declaration. Method are implementations48How to Show Methods in Class Diagrams?49Operation Issues in DCDsThe create operation The create message in an interaction diag
14、ram is normally interpreted as the invocation of the new operator and a constructor call In a DCD this create message will usually be mapped to a constructor definition, using the rules of the language Operations to Access Attributes Often excluded (or filtered) from the class diagram505. KeywordsA
15、UML keyword is a textual adornment to categorize a model element Most keywords are shown in guillemet ( ) but some are shown in curly braces abstract sample predefined UML keywords include:51Stereotypes, Profiles, and Tags526. Generalization, Abstract Classes, Abstract OperationsGeneralization is a
16、taxonomic relationship between a more general classifier and more specific classifier Each instance of the specific classifier is also an indirect instance of the general classifier. The specific classifier indirectly has features of the more general classifier Is shown in UML with a solid line and
17、fat triangular arrows from the subclasses to supper classes53DependencyIn UML, a dependency relationship indicates that a client element has knowledge of another supplier element and that a change in the supplier could affect the clientThere are many kinds of dependency, here are some common types i
18、n terms of objects and class diagramsHaving an attribute of the supplier type Sending a message to a supplier,the visibility to the supplier Receiving a parameter of the supplier type The supplier is a superclass or interface In class diagrams use the dependency line to depict the following dependen
19、cy between objects global, parameter variablelocal variablestatic-method call5455Example56Another ExampleOptional dependency labels577. Interfaces588. Composition Over AggregationAggregation is a kind of association that loosely suggests whole-part relationship Composition is a strong kind of whole-part aggregation and is useful to show in some models A composition relationship im
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 初中历史明朝的统治教案-2024~2025学年统编版七年级历史下册
- 高功能抑郁症的临床护理
- 2025销售人员劳动合同范本 销售劳动合同样本
- 外伤性低颅内压综合征的临床护理
- 煤矿井下超大断面硐室施工技术规范
- 眼睑松弛症的临床护理
- 浙江国企招聘2025上半年湖州市交通投资集团有限公司招聘11人笔试参考题库附带答案详解
- 射洪七小期末试卷及答案
- 2025年物资采购合同模板
- 厦大美术高考试卷及答案
- 班组长、员工安全生产责任制考核记录表
- 老年康体指导职业教育79课件
- 北京市建设工程施工现场安全生产标准化管理图集(2019版)
- 2025年江苏省江宁城建集团招聘笔试参考题库含答案解析
- 大学生就业与创业指导知到智慧树章节测试课后答案2024年秋辽宁广告职业学院
- 题型04 化学工艺流程题-【好题汇编】备战2024-2025学年高一化学上学期期末真题分类汇编(江苏专用)
- 高钛渣及其产品深加工项目的可行性研究报告
- 2024年中国黄油行业供需态势及进出口状况分析
- 三下26《和拖延的坏朋友说再见》心理健康教学设计
- 2025届山东省潍坊市高考英语二模试卷含解析
- 2023无人机系统测评规范
评论
0/150
提交评论