uml

Implementing Connections within Aggregation classes

陌路散爱 提交于 2019-12-24 02:14:12
问题 In the below diagram, the class "Copy" and class "Book" are showing an aggregation (Book has a Copy). All other classes are sub classes of class "Copy". Now, imagine there is a Member class, which has to access the sub classes "Lending" and "Borrow" of class "Copy". The only thing that ' Member ' class should know is "accessionNumber". If we think of this in terms of code, my " Book " class contains an array of " Copy ". How can I know the accessionNumber of a particular book? Lets say I need

Understanding on Termination Connector of State Diagram in IBM Rhapsody

与世无争的帅哥 提交于 2019-12-24 02:13:05
问题 In IBM Rhapsody if i have created instance of a class using new, then Do we have to take care for deallocating memory by calling delete or Termination Connector will handle its destruction with memory deallocation in its State Diagram?? 回答1: If you are using C++ and the OXF (Object Execution Framework), then rather than calling delete , you should call destroy() on the object you want to delete. Example: C *c = new C(); // cleanup c->destroy(); Note: Deleting an OMReactive object while the

UML Sequence Diagram Message Branching

北战南征 提交于 2019-12-24 01:38:38
问题 Has anyone used message branching in sequence diagrams? Does anyone know what this is specifically used for? To the best of my understanding it is used to show a single message being received by multiple recipients I have just seen it used to show concurrency, but I think that is incorrect and should be described by a "par" fragment or inside a co-region. Thoughts and opinions? 回答1: UML 2+ As far as I know there's no such thing as message branching in sequence diagrams in UML 2+ (but see the

UML作业第四次:分析系统,绘制活动图

为君一笑 提交于 2019-12-24 00:11:04
一、活动图 语法小结 简单活动图 活动标签(activity label)以冒号开始,以分号结束。活动默认安装它们定义的顺序就行连接。 开始/结束 可以使用关键字 start 和 stop 表示图示的开始和结束。 条件语句 在图示中可以使用关键字 if , then 和 else 设置分支测试。标注文字则放在括号中。 也可以使用关键字 elseif 设置多个分支测试。 重复循环 可以使用关键字 repeat 和 repeatwhile 进行重复循环。 while循环 可以使用关键字 while 和 end while 进行while循环。 还可以在关键字 endwhile 后添加标注,还有一种方式是使用关键字 is 。 并行处理 可以使用关键字 fork , fork again 和 end fork 表示并行处理。 注释 颜色 箭头 使用 -> 标记,你可以给箭头添加文字或者修改箭头颜色。同时,你也可以选择点状 (dotted),条状(dashed),加粗或者是隐式箭头。 连接器 可以使用括号定义连接器 组合 通过定义分区(partition),你可以把多个活动组合(group)在一起。 泳道 可以使用管道符 | 来定义泳道。还可以改变泳道的颜色。 分离 可以使用关键字 detach 移除箭头。 特殊领域语言 通过修改活动标签最后的分号分隔符( ; ),可以为活动设置不同的形状。

How to show If else condition in a UML system sequence diagram

ぃ、小莉子 提交于 2019-12-23 20:40:24
问题 Is it possible to describe an if-else structure in a system sequence diagram? If yes, how is this done? 回答1: Here's more info about combined fragments from the VS 2010 sequence diagram documentation: UML Sequence Diagrams: Reference UML Sequence Diagrams: Guidelines Describing Control Flow with Fragments in UML Sequence Diagrams 回答2: Yes, this can be done in UML 2 using the 'Alternative' combined fragment type, although personally I find them relatively difficult to read. There is a good

staruml abstract classes?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 17:59:34
问题 does anyone know how to create an abstract class using StarUML? I couldnt find any mention in the documentation. Is there some sort of more general concept which mirrors an abstract class? 回答1: select class from toolBox and add it to canvas, then go to properties select isAbstract checkbox. then class name appears italic. 回答2: Migrated from comment This tutorial creates an abstract class. http://cnx.org/content/m15092/latest 回答3: View menu > select Editors > select class name and/or method in

UML class aggregating to self

南笙酒味 提交于 2019-12-23 16:18:21
问题 My group and I are making a program, where we have a tree structure. In this tree structure we have made it such that a category can contain it self. The program is based on your expenses, so an example could be: You have bought 4 milk. The 4 items of milk are placed in the category "Milk". Each entry of milk has the price (along with other individual information) in another class which category aggregates. The trick is that we want the category class to be able to contain it self, so: The

UML类图学习

感情迁移 提交于 2019-12-23 13:51:06
概念一:Unified Modeling Language (UML) 又称统一建模语言或 标准建模语言 ,是始于1997年一个 OMG 标准,它是一个支持模型化和软件系统开发的图形化语言,为软件开发的所有阶段提供模型化和可视化支持,包括由需求分析到规格,到构造和配置。                                                                                                            -----百度百科 理解: UML是有用的,主要用在设计和分析阶段,但是 UML 不适合用来做代码生成。 从这个问题里,也正好发现了一个有意思的事儿:图形化的方式传达信息的能力很强,但是通过图形化语言去做编程反而很困难。代码生成或者说技术效率的提升,一直以来靠得其实是 DSL。UML 有几种图?第一反应是不是类图?其实,还有用例图、顺序图、活动图、状态图、组件图等。这里提到的每一种图,都代表着工程的一个特定维度,它们的专注点是正交的,都有其独特的用处。使用 UML 来分析和设计,可以让大家对整个系统有个更全面的认知。 ------知乎 孙桥(厘米脚印创始人)链接:https://www.zhihu.com/question/23569835/answer/121585709: 类图中类与类之间的关系 一

Magic getters and setters in Enterprise Architect

佐手、 提交于 2019-12-23 12:13:29
问题 I'm using Enterprise Architect to make a UML class diagram and generate PHP5 code with it. Using this, one can make getters and setters for an attribute, which looks like this in the code (only relevant lines shown): private $id; public function getId() { return $this->id; } /** * * @param newVal */ public function setId($newVal) { $this->id = $newVal; } I'd like to use the magic methods __get($property) and __set($property, $value) instead of seperate methods for each property. Is it

How do you model a Java for each loop on a UML sequence diagram?

你说的曾经没有我的故事 提交于 2019-12-23 10:17:47
问题 for (Item i : collection) { i.foo(); } In some abstract sequence diagrams you have a loop combined fragment with a condition along the lines of e.g. [for each item] . On a sequence diagram featuring Java implementation; what would you use as a loop guard? If all lifelines must represent an object instance, how would you show that i: Item is not a single instance, but on each iteration a different object from the collection ? 回答1: You don't show each single bit in a SD but just an overview: it