uml

软件开发中会用到的图

流过昼夜 提交于 2019-12-19 13:47:20
阅读目录 背景 图为了解决什么问题 不同流程中适合运用的图 实际的运用 结语 一、背景   大家应该在从事软件开发领域工作时间有一段时间之后,就开始有画图的意识,不管是懵懂的学别人还是想更好的让其它人理解自己的一个观点。所谓“一图胜千言”,我们身处于软件开发这个 水很深且要求精确 的复杂 领域 里,要想把事情做好,最基本的是要把事情想明白,其次还要让相关的人能够明白你要说的东西,进行协作。   特别对于一位架构师来说,能否画得一手好图尤其重要,因为相关的干系人数较多,要让不同领域的人能够达成一个统一的认识,是一件不太容易但也是必须要做好的事情。 二、图为了解决什么问题   软件开发涉及的流程是:需求 --> 开发 --> 测试 --> 发布上线。作图本身是个设计的工作,是个前期工作。那么从软件开发的整个生命周期来说,用到的图的地方是在前期的需求、开发阶段较多。在软件开发这个非常抽象的领域,只要涉及到多人协作,那么通过文字来进行交流叙述是非常晦涩难懂的,需要沟通好几遍才能理解达成一致也是比较常见的情况。那么我们画图,就是为了把不适合用言语表述的内容通过作图的方式呈现出来,让相关协作者有一个共同的具象的参照物。这个参照物可以有它的额外价值,是对软件长期价值的延伸,一份一致、清晰的设计图,可以给后续的软件迭代提供非常有帮助的决策依据。当然保证设计图与系统的一致本身也是件费精力的事情。 三

Does generalization exist in UML Use Case Diagrams?

穿精又带淫゛_ 提交于 2019-12-19 10:33:09
问题 I'm trying to model some requirements and I saw some examples in the web with use cases generalization, but the UML 2.5 standard review doesn't say anything about generalization in Use Case Diagrams, or I can't find it. So, is generalization supported by standards? 回答1: Since a UseCase is a Classifier, they can be generalized. The UML 2.5 spec contains an example of this in Fig. 18.11 on p. 686 (the "ATM Services" example). 回答2: Tricky. While the Generalization relationship is defined as

UML use case: listing vs diagram

穿精又带淫゛_ 提交于 2019-12-19 04:37:28
问题 I'm confused about a book I'm reading. I always thought use cases where some kind of diagram with actors and bubbles like this one from wikipedia : But in Head First Object-Oriented Analysis and Design - O'Reilly, what are called "use cases" are just listings with main/happy paths and alternate paths. O'Reilly provides a sample from this book here (you can scroll to page 71 of the pdf, which is page 123 in the book) and these listings look like: Main Path 1. Fido barks to be let out. 2. The

深入浅出UML类图(二)

丶灬走出姿态 提交于 2019-12-18 23:10:01
类与类之间的关系(1) 在软件系统中,类并不是孤立存在的,类与类之间存在各种关系,对于不同类型的关系, UML 提供了不同的表示方式。 1. 关联关系 关联 (Association) 关系 是类与类之间最常用的一种关系,它是一种结构化关系,用于表示一类对象与另一类对象之间有联系,如汽车和轮胎、师傅和徒弟、班级和学生等等。在 UML 类图中,用实线连接有关联关系的对象所对应的类, 在使用 Java 、 C# 和 C++ 等编程语言实现关联关系时,通常将一个类的对象作为另一个类的成员变量 。在使用类图表示关联关系时可以在关联线上标注角色名,一般使用一个表示两者之间关系的动词或者名词表示角色名(有时该名词为实例对象名),关系的两端代表两种不同的角色,因此在一个关联关系中可以包含两个角色名,角色名不是必须的,可以根据需要增加,其目的是使类之间的关系更加明确。 如在一个登录界面类 LoginForm 中包含一个 JButton 类型的注册按钮 loginButton ,它们之间可以表示为关联关系,代码实现时可以在 LoginForm 中定义一个名为 loginButton 的属性对象,其类型为 JButton 。如图 1 所示: 图 1 关联关系实例 图 1 对应的 Java 代码片段如下: public class LoginForm { private JButton

UML ternary association

醉酒当歌 提交于 2019-12-18 22:18:22
问题 I'm currently having some trouble understanding ternary associations in UML. I get the binary ones, but I am unsure how multiplicity works on ternary. I'm doing exercises that I got from my university, the current one goes like this: One department may sell many products, but only to one market. On a market one product may only be sold by one department. I've read on different sources about how I'm supposed to think about a pair of the two classes I'm not trying to figure out the multiplicity

一张类图理解UML各种关系

浪尽此生 提交于 2019-12-18 19:19:13
类图的各种箭头,各种关系总是记了忘,忘了记,这次画个图再加深一下记忆: 聚合和组合是两种比较特殊的关联关系。补充如下: 1.继承 子类拥有超类的所有属性和行为 class A{} //B继承了A中的所有的方法和属性,对于私有的方法和属性,子类只能是拥有,但无法直接使用。 class B extends A{} 2.关联 一般以类的属性形式出现在关联类中,使用成员变量来实现。又分为聚合关系和组合关系。 class A{} class B{ A a;//成员变量引入了A类 } 3.聚合 has a:强关联,一个类的实例由另一个类的实例构成,后期使用不会因为对象的删除而删除。 class A{} class B{ A a;//成员变量引入了A类   B(A a){    this.a = a;   } } 4.组合 contains a:强聚合,组合的对象不能由其他对象共享,且与构成他的对象一起消亡。整体和部分是不可分割的,有共同的生命周期。 class A{} class B{ A a;//成员变量引入了A类 B(){ this.a = new A(); } } 来源: CSDN 作者: 汤米粥 链接: https://blog.csdn.net/nnmmbb/article/details/103595244

Difference between Sequence Diagram (SD) and a System Sequence Diagram (SSD)?

谁说胖子不能爱 提交于 2019-12-18 18:51:01
问题 I'm working on a project for a grad class and still having trouble wrapping my head around them. What is the difference between a sequence diagram (SD) and a system sequence diagram (SSD) ? And in what order should they be developed when working on a systems development project? 回答1: A System sequence diagram visualizes a use case, while a sequence diagram visualizes a method of a class. The elements participating (exchanging messages) in a system sequence diagram are Actors and Systems. The

UML help C# Design Principles

a 夏天 提交于 2019-12-18 18:14:21
问题 I have a problem understanding an UML below: Specifically, what is the relationship between PersistentSet and ThirdPartyPersistentSet ? What is the relationship between PersistentObject and ThirdPartyPersistentSet ? Please note that the UML is from Agile Principles, Patterns, and Practices in C# By Martin C. Robert, Martin Micah 2006. Chapter 10 Thanks in advance! 回答1: The relationship between PersistentSet and ThirdPartyPersistentSet is an Aggregation, which means the PersistentSet contains

Class Modeling alternatives for Objective-C

夙愿已清 提交于 2019-12-18 12:54:21
问题 Since the Class Model tool was eliminated in Xcode 4, what other alternatives could you recommend for UML modeling tools for Objective-C? 回答1: OmniGraffle does UML diagrams. It doesn't generate code, though. 回答2: You can use yEd ... not the best solution and does not generate graphs as OmniGraffle can do but at least it can export in SVG and use GraphML files to store the data. (and it is fee) http://www.yworks.com/en/products_yed_helpresources.html 回答3: I'd recommend Visual Paradigm which

JSDoc UML Diagram

泪湿孤枕 提交于 2019-12-18 12:27:50
问题 Question: I'm editing and using an open source javascript library that has JSDoc tags in its code. I was wondering if anyone knew of a JSDoc plugin that would allow me to generate a class diagram from the JSDoc tags. Edit I decided to try out js/uml and found the following. The JS/UML eclipse extension requires an older version of Eclipse (Indigo) and a non-supported dependency library UML2tools. I found the dependencies needed and according to the Eclipse software manager installed correctly