uml

How do you show events in UML Class Diagrams? [closed]

扶醉桌前 提交于 2019-11-29 12:24:41
问题 This one has me stumped regularly while creating top level class diagrams for documentation. Methods and attributes/fields are easy to model. I usually end up adding a method named EvChanged to indicate a .Net event Changed. What is the right way to show that a type publishes a specific event? 回答1: Just add an «event» stereotype to a classifier attribute. 回答2: I find onEventName() the easiest naming scheme for event callbacks, but how to indicate which events an object can broadcast I've not

Is there a way to draw UML in Visio for Java?

半世苍凉 提交于 2019-11-29 12:23:39
问题 I have Visio2007 and I really like it. However, it doesn't seem to have UML model/datatypes for Java. Is there some template I can download for Java? Or should I just forget about Visio altogether and get an Elipse plugin? Thanks! 回答1: The latter is a better option, IMHO. Further, I don't think UML Models should be specific to Java. I am not aware of, if there are any java-specific UML, around. I found this while searching over the net. UML Models: MS Visio 2007. 回答2: I had the same question,

Does an association imply a dependency in UML? [closed]

我的梦境 提交于 2019-11-29 11:46:15
In discussion about my answer to this question , there was some disagreement over how to model this code: public class MainClass { private Something something; public void Action() { OtherClass other = something.GetOtherClass(); } } The key points being: the Something class is an attribute in MainClass , suggesting an association the Something class is referenced within MainClass , suggesting a dependency A dependency is supposed to be a specialised association However, since a dependency is can be appropriate in cases where the supplier class is not an attribute, does using a dependency "hide

UmlGraph vs APIViz for Maven javadoc generation

最后都变了- 提交于 2019-11-29 11:28:22
I'm wondering if there are any clear reasons to choose UmlGraph over APIViz for javadoc UML diagram generation in a Maven2 build. Are there any integration or features that one has over the other, they seem pretty similar? Pascal Thivent There is an interesting thread here about UMLGraph vs apiviz (which are mentioned in this question on SO too) and my understanding is the following: UMLGraph is older but is really nice (dixit Fowler which has more weight than me). apiviz is a rewrite of UMLGraph but it's not really clear why the rewrote it. The "big" advantage of apiviz is that the build won

五分钟看懂UML类图与类的关系详解

自作多情 提交于 2019-11-29 09:40:27
在画类图的时候,理清类和类之间的关系是重点。类的关系有泛化(Generalization)、实现(Realization)、依赖(Dependency)和关联(Association)。其中关联又分为一般关联关系和聚合关系(Aggregation),合成关系(Composition)。下面我们结合实例理解这些关系。 基本概念 类图(Class Diagram): 类图是面向对象系统建模中最常用和最重要的图,是定义其它图的基础。类图主要是用来显示系统中的类、接口以及它们之间的静态结构和关系的一种静态模型。 类图的3个基本组件:类名、属性、方法。 泛化(generalization):表示is-a的关系,是对象之间耦合度最大的一种关系,子类继承父类的所有细节。直接使用语言中的继承表达。在类图中使用带三角箭头的实线表示,箭头从子类指向父类。 实现(Realization):在类图中就是接口和实现的关系。这个没什么好讲的。在类图中使用带三角箭头的虚线表示,箭头从实现类指向接口。 依赖(Dependency):对象之间最弱的一种关联方式,是临时性的关联。代码中一般指由局部变量、函数参数、返回值建立的对于其他对象的调用关系。一个类调用被依赖类中的某些方法而得以完成这个类的一些职责。在类图使用带箭头的虚线表示,箭头从使用类指向被依赖的类。 关联(Association) : 对象之间一种引用关系

Private nested Java class in UML diagram

。_饼干妹妹 提交于 2019-11-29 09:16:50
I have a question regarding UML. I have a class which simply contains an inner class with the private access modifier - cannot be accessed from anywhere else... Normally in order to present an inner class relation I can use a (+) relation like here ( InnerOddIterator ): (taken from http://www.uml-diagrams.org/nested-classifier.html ) I have not found anywhere any information about how can clearly emphasize that this class is private. Do you know if such a method exist at all? If yes I'll be grateful you give me some link here or something? Just to keep things clear, a sample code: public class

Shortcut for denoting or implying getters and setters in UML class diagrams

血红的双手。 提交于 2019-11-29 06:34:54
问题 In a UML class diagram, if a class has 5 private attributes that need to be mutable and readable, the UML gets pretty ugly with 10 get/set methods even without any of the class' interesting functionality: Ugliness aside, I feel like the UML should focus on the class' more interesting functionality. Am I correct? Is there some standard shortcut for denoting or implying getters and setters for private attributes? 回答1: You are correct: there is no need to include the (noise of) "boilerplate"

Standard UML file format

谁说胖子不能爱 提交于 2019-11-29 06:15:48
问题 I have designed UML diagrams in different tools (StarUML, BoUML, Papyrus, Omondo, Rational Rose, etc.) depending on the project and the date (rose was first, after Omondo, then starUMl, ..., now papyrus). However, I see that I cannot open my old UML diagrams because the tool is obsolete. I would like to know if there is a standard format for UML diagrams. Probably not in production, but at least to know if there is proposal of standard format. Probably, Eclipse is doing something like that

Java 大黑话讲解设计模式 -- UML类图

我怕爱的太早我们不能终老 提交于 2019-11-29 05:49:09
前言 关于UML类图的这篇文章,我觉得把它放在设计模式专栏的篇首最为合适,因为在学习设计模式的时候,经常会遇到有关UML类图,没有去专门学过的童鞋肯定会感觉很复杂。学到后面,发现不掌握UML类图,对设计模式或者某一个框架没有整体的把控。所以学好UML类图,你将会更加有自信! 如果你对类之间的依赖、聚合、关联、组合等关系还很抵制的话,那么这篇文章就很有必要看了,随着对设计模式的慢慢深入了解,或许你也会发现,UML类图就显得格外重要了,是的,UML类图主要是用来描述类之间的轮廓图,而类之间的常见关系就是泛化(Generalization)、实现(Realization)、依赖(Dependence)、关联(Association)、聚合(Aggregation)、组合(Composition)等。类之间关系的强弱:依赖 < 关联 < 聚合 < 组合 < 泛化(继承) @[toc] 1、啥是UML类图? 首先来看一个专业一点的定义【来自维基百科】 UML即 统一建模语言 (Unified Modeling Language),它是一种开放的方法,用于说明、可视化、构建和编写一个正在开发的、面向对象的、软件密集系统的制品的开放方法。UML展现了一系列最佳工程实践,这些最佳实践在对大规模,复杂系统进行建模方面,特别是在软件架构层次已经被验证有效。 不得不说,越专业的描述越让人看得越发懵逼..

Can UML state machine diagram be used to show the screen navigation?

心不动则不痛 提交于 2019-11-29 05:23:09
Can UML state machine diagram be used to show the screen navigation? Sure you can create a UML model of the UI as a state machine, for example: Screens are states State transitions i.e. screen changes occur on specific inputs or other triggers Did you actually have some more specific question? You can use state machines but it is also possible to use sequence diagrams for that. If you don't need to stick to the pure UML, there are plenty of approaches devoted to the specification of web systems that include the concept of web navigation models (with elements as pages, links,...). These