uml

How to use pyreverse on Windows

点点圈 提交于 2020-01-01 03:18:26
问题 I would like to create diagram class using pyreverse. I download it, and when I use this command: pyreverse.bat -c PyreverseCommand -a1 -s1 -f ALL -o png test.py I get an error "The name 'dot' is not recognized....". What is "dot", how can I create diagram class? Thanks for answers. 回答1: dot is part of Graphviz (http://www.graphviz.org/About.php). You need to install Graphviz and then modify your PATH so Windows (what I assume you are using) can find it. "the command pyreverse generates the

MVC UML class diagram

两盒软妹~` 提交于 2020-01-01 02:46:10
问题 I've have to work on a new project,written in C# mvc,the first thing i would like to do is create an UML class diagram. Is there somewhere an example of how to do this? Most examples show one controller with one view and one model. But in this project there is per controller multiple Views and multiple ModelDto's Thanks. 回答1: You can do like below by using MS visio or any other UML tool. Just a sample looks like below (methods and properties should differ) Like above you can extend the above

How to show Dependency Injection on a UML class diagram?

只谈情不闲聊 提交于 2019-12-31 10:31:25
问题 How do I show Dependency Injection of an object or class in a UML class diagram? 回答1: Martin Fowler shows it like this: 回答2: You display class dependencies by using a dashed line with a pointed arrow that points from the client model element to the supplier model element. I think that how you provide the dependencies to the client is irrelevent at the UML level. 来源: https://stackoverflow.com/questions/4488481/how-to-show-dependency-injection-on-a-uml-class-diagram

How to show Dependency Injection on a UML class diagram?

蓝咒 提交于 2019-12-31 10:31:12
问题 How do I show Dependency Injection of an object or class in a UML class diagram? 回答1: Martin Fowler shows it like this: 回答2: You display class dependencies by using a dashed line with a pointed arrow that points from the client model element to the supplier model element. I think that how you provide the dependencies to the client is irrelevent at the UML level. 来源: https://stackoverflow.com/questions/4488481/how-to-show-dependency-injection-on-a-uml-class-diagram

UML Diagrams: Can I use same actor on one diagram couple of times?

纵饮孤独 提交于 2019-12-31 02:45:07
问题 I am drawing some diagram, and I am wondering if it is acceptable for the actor to be in diagram more than once (for better transparency of the diagram)? Thanks 回答1: UMLDiagram is a composition of UMLDiagramElement s, however Actor is NOT UmlDiagramElement , it is an Element . The UMLDiagramElement counterpart for Actor is either UMLShape (when shown as icon/figure) or UMLClassifierShape (when shown as a class box). You have to keep the concepts of "UML Model" and "UML Diagram" separate.

UML Class Relationships

巧了我就是萌 提交于 2019-12-30 10:26:51
问题 I would like to confirm whether I am on the right track when identifying common UML class relationships. For example, is the relationship between: 1 a stackoverflow member and his/her stackoverflow user account categorized as a composition relationship or an aggregation relationship? At first I thought it was an association because this member "has a" account. However on second thought, I am thinking its composition because each "part" (user account) belongs to only one whole (user) at a time

UML各种类图总结

南楼画角 提交于 2019-12-30 10:11:54
文章目录 一、用例图 二、类图 1、泛化 2、实现 3、关联 4、聚合 5、组合 6、依赖 7、各种类图关系 三、对象图 四、状态图 五、活动图 六、序列图-时序图 1、生命线 2、同步消息 3、异步消息 4、注释 5、约束 七、协作图 八、构件图 九、部署图 一、用例图    用例图主要回答了两个问题:1、是谁用软件。2、软件的功能。 从用户的角度描述了系统的功能,并指出各个功能的执行者,强调用户的使用者,系统为执行者完成哪些功能 。 二、类图    用户根据用例图抽象成类,描述类的内部结构和类与类之间的关系,是一种静态结构图。 在UML类图中,常见的有以下几种关系: 泛化(Generalization), 实现(Realization),关联(Association),聚合(Aggregation),组合(Composition),依赖(Dependency) 。各种关系的强弱顺序: 泛化 = 实现 > 组合 > 聚合 > 关联 > 依赖 1、泛化    泛化关系是一种继承关系,表示一般与特殊的关系,它指定了子类如何继承父类的所有特征和行为 。例如:老虎是动物的一种,即有老虎的特性也有动物的共性。 2、实现    实现关系是一种类与接口的关系,表示类是接口所有特征和行为的实现 。 3、关联    关联关系是一种拥有的关系,它使一个类知道另一个类的属性和方法 ;如:老师与学生

what is the differences between class and dataType

做~自己de王妃 提交于 2019-12-30 08:14:51
问题 As i read through UML specification that: class has a set of attributes/operations and data type has a set of attributes/operations 1)with regards to attributes/operations of data type what this means? because i don't know how such a data type has attributes and operations? 2)What’s the main difference between a class and a datatype? 回答1: according to UML 2.4.1 specification A data type is a special kind of classifier, similar to a class. It differs from a class in that instances of a data

UML类图

女生的网名这么多〃 提交于 2019-12-30 05:44:33
类的继承结构表现在UML中为:泛化(generalize)与实现(realize): 泛化关系(generalization): 带空心箭头的直线 继承关系为 is-a的关系;两个对象之间如果可以用 is-a 来表示,就是继承关系:(..是..) 注:最终代码中,泛化关系表现为继承非抽象类; 实现关系(realize): 带空心箭头的虚线 注:最终代码中,实现关系表现为继承抽象类; 聚合关系(aggregation): 带空心菱形箭头的直线 聚合关系用于表示实体对象之间的关系,表示整体由部分构成的语义;(不稳定的包含关系,has-a) 与组合关系不同的是,整体和部分 不是强依赖 的,即使整体不存在了,部分仍然存在; 组合关系(composition): 带实心菱形箭头直线 与聚合关系一样,组合关系同样表示整体由部分构成的语义;(强烈的包含关系 contains-a) 但组合关系是一种 强依赖 的特殊聚合关系,如果整体不存在了,则部分也不存在了; 关联关系(association): 一条直线 描述不同类的对象之间的结构关系;它是一种静态关系, 通常与运行状态无关,一般由常识等因素决定的;它一般用来定义对象之间静态的、天然的结构; 所以,关联关系是一种“强关联”的关系; 关联关系默认不强调方向,表示对象间相互知道; 注:在最终代码中,关联对象通常是以成员变量的形式实现的; 依赖关系

UML建模之类图

随声附和 提交于 2019-12-30 05:43:16
UML类间关系的种类 从一个示例开始 请看以下这个类图,类之间的关系是我们需要关注的: 车的类图结构为<<abstract>>,表示车是一个抽象类; 它有两个继承类:小汽车和自行车;它们之间的关系为实现关系,使用带空心箭头的虚线表示; 小汽车为与SUV之间也是继承关系,它们之间的关系为泛化关系,使用带空心箭头的实线表示; 小汽车与发动机之间是组合关系,使用带实心箭头的实线表示; 学生与班级之间是聚合关系,使用带空心箭头的实线表示; 学生与身份证之间为关联关系,使用一根实线表示; 学生上学需要用到自行车,与自行车是一种依赖关系,使用带箭头的虚线表示; 下面我们将介绍这六种关系; 类之间的关系 泛化关系(generalization) 类的继承结构表现在UML中为:泛化(generalize)与实现(realize): 继承关系为 is-a的关系;两个对象之间如果可以用 is-a 来表示,就是继承关系:(..是..) eg:自行车是车、猫是动物 泛化关系用一条带空心箭头的实线表示;如下图表示(A继承自B); 【箭头指向】:带三角箭头的实线,箭头指向父类。 eg:汽车在现实中有实现,可用汽车定义具体的对象;汽车与SUV之间为泛化关系; 注: 最终代码中,泛化关系表现为继承非抽象类 ; 实现关系(realize) 实现关系用一条带空心箭头的虚线表示; 【箭头指向】:带三角箭头的虚线