uml

UML类图几种关系的总结

拜拜、爱过 提交于 2020-01-09 08:47:07
在UML类图中,常见的有以下几种关系: 泛化(Generalization), 实现(Realization),关联(Association),聚合(Aggregation),组合(Composition),依赖(Dependency) 1. 泛化( Generalization ) 【泛化关系】:是一种继承关系,表示一般与特殊的关系,它指定了子类如何特化父类的所有特征和行为。例如:老虎是动物的一种,即有老虎的特性也有动物的共性。 【箭头指向】:带三角箭头的实线,箭头指向父类     2. 实现( Realization ) 【实现关系】:是一种类与接口的关系,表示类是接口所有特征和行为的实现. 【箭头指向】:带三角箭头的虚线,箭头指向接口      3. 关联( Association) 【关联关系】:是一种拥有的关系,它使一个类知道另一个类的属性和方法;如:老师与学生,丈夫与妻子关联可以是双向的,也可以是单向的。双向的关联可以有两个箭头或者没有箭头,单向的关联有一个箭头。 【代码体现】:成员变量 【箭头及指向】:带普通箭头的实心线,指向被拥有者      上图中,老师与学生是双向关联,老师有多名学生,学生也可能有多名老师。但学生与某课程间的关系为单向关联,一名学生可能要上多门课程,课程是个抽象的东西他不拥有学生。 下图为自身关联:     4. 聚合( Aggregation

UML基础与应用之类图和包图

两盒软妹~` 提交于 2020-01-08 20:59:48
一、类图 (一)类 1.定义 :对真实事物的抽象描述 2.包含 :类名;属性;方法 3.类表示 :+表示公有;-代表私有;#代表保护 (二)类的关系 1.关联 (关联类:将两个对象连接看成一个类,叫做关联类;) 1.1 普通关联 (Works in是关联名称;Employee和Employer是关联角色;0…*/1/1…*等体现多重性) 单向关联(导航关联);双向关联 1.2聚合 (“整体/部分”;空心菱形表示) 1.3组合 (实心菱形表示;部分依赖于整体) 2.依赖 (一种使用关系,说明一个事物规格的变化可能影响到使用它的另一个事物;前者依赖于后这,箭头后依赖于箭头后) 3.泛化 (描述的是类之间的继承关系;箭头是父类,尾部是子类) 3.1单重继承 3.2多重继承 (Java中不可以直接实现多重继承,可通过接口实现) 4.实现 (一个类元实现另一个类元的契约;虚线尾部实现箭头处的接口) (三)类图构成 1.类图作用 用于描述系统的静态部分 2.类图构成 classes(类);interfaces(接口);collaborations(协作);relationships(关系);package(包);system(子系统) (四)类图深入讨论 1.可见性(Visiblity) public(name;+)/private(age;-)/protected(salary;#)

UML state diagrams with draw.io

萝らか妹 提交于 2020-01-08 10:53:04
https://about.draw.io/uml-state-diagrams-with-draw-io/ State diagrams have been used in programming to describe the various possible states that a system can be in for decades. They also quickly show which states lead to each other, and what triggers a change of state. Of course, you can use these diagrams for anything system or process that has various states – library books, a publishing process, even punishment and reward states for your kids. They are very similar to flow diagrams, but UML has a notation specifically for state diagrams, which they also call state machines or statecharts.

软件工程试题(作业)

…衆ロ難τιáo~ 提交于 2020-01-07 08:12:05
如何评测软件工程知识技能水平? 我的CSDN: https://blog.csdn.net/P71720/article/details/103742773 (一),选择题(5*2) (1) 需求分析中开发人员要从用户那里了解( A )。     A.软件做什么  B.用户使用界面  C.输入的信息  D.软件的规模 (2) 软件开发的瀑布模型,一般都将开发过程划分为:分析、设计、编码和测试等阶段,一般认为可能占用人员最多的阶段是( C )。 A.分析阶段 B.设计阶段 C.编码阶段 D.测试阶段 答案解析:在结构化的软件开发中,一般情况下,可能需要占用的人数最多的阶段是在软件编程的阶段,但从工作量上来说,在软件的需求分析、定义及软件的测试和维护阶段需要的工作量更多,用软件开发计划中的40-20-40原则,即可说明这一点,在软件需求分析和定义阶段,虽然工作量比软件编程多,但因为软件的需求分析和定义对开发人员的素质要求比较高,所以占用的人员并不需要太多;同时由于软件维护的周期比较长,所以其耗的工作量比软件编程多,但一般来说它占用的人员并不比软件编程阶段占用的人员多,所以答案为C。 (3) 当一个模块直接使用另一个模块的内部数据,这种模块之间的耦合为( D ) 。 A、数据耦合    B、公共耦合 C、标记耦合    D、内容耦合 (4) UML是软件开发中的一个重要工具

Sequence diagram which returns a boolean

杀马特。学长 韩版系。学妹 提交于 2020-01-07 06:27:25
问题 I want to know how to return a value in a sequence diagram, for example: if(a>b) return true; else return false; 回答1: Here are two variants. Please, notice, that dashed line means returning message. Solid line with parameters - calling message. Full triangle arrow head means synchronous call. Line angle triangle arrow head means asychronous call. But in the return message arrow ALWAYS has such head. But if you really have so light cases as you have shown, it's better to use "alt" combined

ObjectAid UML Unsupported major.minor version 52.0

眉间皱痕 提交于 2020-01-07 04:14:07
问题 I'm trying to install the ObjectAid software for Eclipse Luna 4.4 . Eclipse Environment: JDK Compliance 1.8 Installed JREs: jre1.8.0_60 System Environment: Java 1.8.0_60 After installing the current release 1.2 (http://www.objectaid.com/update/current) and restarting Eclipse when I try to add a diagram ( File > New > ObjectAid UML Diagram > Class Diagram ) I get the following error: The selected wizard could not be started. Plug-in com.objectaid.uml.cls was unable to load class com.objectaid

How to model associative arrays in UML?

怎甘沉沦 提交于 2020-01-07 03:51:14
问题 I know there are some related questions about this question, such as this, this and this, but no one of them really helped me. My array keys are dynamic, so I can't create an additional class holding this attributes (like done in second linked question). The idea of my concept is to hold instances of classes as follows: $instances = [ "nameOfClass" => [ //instances of "nameOfClass" ], "nameOfClass2" => [ //instances of "nameOfClass2" ] //some more classes ]; But I don't know how to model

如何评测软件工程知识技能水平

♀尐吖头ヾ 提交于 2020-01-06 20:14:24
根据本课程的学习以及自身的知识和经验,您认为一个软件工程师的软件工程知识技能水平高低主要体现在哪些方面,请您简要总结一下:   1.具有优秀的学习能力,IT技术更新很快,软件工程师应具备的技能里很重要的一点就是学习能力。只有具备了学习能力,才能很快适应市场与业务的需要,有时候工作的需求不是你在学校就已经学过的,只能靠着之前积累的经验与快速学习熟悉新的知识,升华自己的能力,为以后成为架构师后者其他职位打下基础。   2.具有扎实的计算机专业知识,吃透高等数学、离散数学、算法等课程。(1)基础编程语言,编程语言是软件工程师必备的技能,不同方向的开发需要使用到不同的编程语言通常来说,软件工程师往往需要掌握多门编程语言。(2)算法。算法是软件工程师的重点知识技能,算法的掌握情况往往能够决定软件工程师的成长高度。(3)数据库。信息是以数据为中心的,因此与数据库的交互在所有软件中都是必不可少的,了解数据库操作和编程是软件工程师需要具备的基本素质之一。目前常用的数据库软件有Oracle数据库和SQL Server等。   3.具有对这个行业的热爱,才有能坚持与继续学习的动力。   4.具有良好的交流与沟通能力,现在的软件开发永远不是一个人的游戏,需要与团队成员协调沟通,分配好工作的任务与进度,才能够开发出高质量的软件。 一、选择题 1、软件工程的出现主要是由于( ) A.程序设计方法学的影响  

designing an operation using uml sequence diagram

旧城冷巷雨未停 提交于 2020-01-06 14:14:22
问题 How to design this operation using the UML sequence diagram? Scenario: The Tasks (Controler Task) adds one line on the database, the Computer (Controler Computer) gets in loop the full lines of the database and when it detects a new added line in DB (Entity Task), it gets the IP address and the port number of the server (Controler Server) from the database (Entity Server) and then sends the message. Any brilliant suggestion, please? Thanks a lot! 回答1: Operation is behavioral feature. It has

is this a flaw?

折月煮酒 提交于 2020-01-06 13:51:13
问题 In Visio I can only alter one side of the relationship. If I want a "1-M" relationship, I have to choose "Identifying", but this automatically makes the FK becomes PK, which doesn't seem right to me. Someone with the same problem said it was a flaw, so there is no way around it in visio? 回答1: Make sure "Required" is checked for the foreign key column(s) in the column list in the child table. If you do that you should see the relationship depicted as: -II--O<-, which I guess is what you want.