uml

Associative array in UML class diagram

六月ゝ 毕业季﹏ 提交于 2019-12-11 07:54:11
问题 I have an array that I want to show in a class diagram. protected static $config = array( 'host' => 'localhost', 'username' => '', 'password' => '', 'dbname' => '' ); is this a correct way : $config( key: 'localhost', value: '', key: 'username', value: '', key: 'password', value: '', key: 'dbname', value: '') and underlined the whole line for static 回答1: Usually one doesn't use UML to configure things, but you can do it. You would need to create instance specifications to get the result you

why is it possible to model a <<use>> dependency between an actor and a use case?

别等时光非礼了梦想. 提交于 2019-12-11 07:26:26
问题 Tools allow to create a use dependency between an actor and a use case even if the meaning of a such dependency is not clear and if no such dependencies are described in the norm ? 回答1: The answer contains two parts : one about the keyword << use >> and one about Dependencies usage. Keyword: "UML keywords are reserved words that are an integral part of the UML notation and normally appear as text annotations attached to a UML graphic element or as part of a text line in a UML diagram." (page

Generalization arrows

北慕城南 提交于 2019-12-11 07:24:29
问题 Do generalization arrows in class diagram has to be strictly open or is there a margin of tolerance on style of this arrows? 回答1: Open arrows are used together with a dashed/dotted line to represent dependencies. I can't think of a standard way to use them with a regular line. Furthermore, as Martin Fowler clearly indicates in UML Distilled, UML is just a notation. If the people that will read your diagrams are aware that open arrow = closed arrow , then feel free to use it. There is no

软件需求分析-----用例图

别等时光非礼了梦想. 提交于 2019-12-11 07:11:22
本文通过学习原文: 1、https://blog.csdn.net/haoyoumo/article/details/43267121 2、https://blog.csdn.net/weixin_42369687/article/details/90106419 3、https://blog.csdn.net/yoyo328/article/details/78009237 将其整理在此处,方便使用。 UML中用例图的作用及画法 用例图(Use Case Diagram)是由软件需求分析到最终实现的第一步,它描述人们如何使用一个系统。用例视图显示谁是相关的用户、用户希望系统提供什么样的服务,以及用户需要为系统提供的服务,以便使系统的用户更容易理解这些元素的用途,也便于软件开发人员最终实现这些元素。用例图在各种开发活动中被广泛的应用,但是它最常用来描述系统及子系统。 当用例视图在外部用户出现以前出现时,它捕获到系统、子系统或类的行为。它将系统功能划分成对参与者(即系统的理想用户)有用的需求。而交互部分被称作用例。用例使用系统与一个或者多个参与者之间的一系列消息来描述系统中的交互。 用例图包含六个元素,分别是:参与者(Actor)、用例(Use Case)、关联关系(Association)、包含关系(Include)、扩展关系(Extend)以及泛化关系

Exit activity diagram at any point

自闭症网瘾萝莉.ら 提交于 2019-12-11 06:46:14
问题 We're currently designing an application with an exit button, meaning the user can exit the application at any time. Now, we're not sure how to write this down. Right now, we're thinking about doing it like shown in the picture below, because this is the only way we know how to do this. However, we feel like there must be an easier way. Also: if we do this for our whole application (which is quite big), we'd get a whole ton of decision and end nodes... 回答1: Your model looks ok. Instead of

According to the Use case <<view reports>>, can we say that the diagram is correct?

假如想象 提交于 2019-12-11 06:25:15
问题 In my project, users (admins and education expert) are able to see dynamic reports. These reports are created in the Report File Manager. Now, to draw up a use case view reports , Is the following diagram correct? It should be noted that the admin are able to view all the reports and the education expert is able to view his self report. Will this change use case diagram? //////According to the answers,I've drawn a new diagram. 回答1: The first thing I notice is your strange actor notation which

OCL is it allow to write constraint on an operation and attribute

隐身守侯 提交于 2019-12-11 06:14:24
问题 Imagine the following class Person ================ | Person | |--------------| |- name | |- age | |--------------| |+ drinkWater()| |+ drinkBeer() | ================ Using OCL, is it possible to set a constraint on the operation drinkBeer() ? For instance allowing only Person >= 21 year old to drink beer? 回答1: context Person::drinkBeer() pre Adult: self.age >= 21 should probably do. 来源: https://stackoverflow.com/questions/43815870/ocl-is-it-allow-to-write-constraint-on-an-operation-and

How to go with well-known classes and interfaces in an UML class diagram

China☆狼群 提交于 2019-12-11 05:35:15
问题 Given I have two Java classes Foo and Bar , and Bar has a getFoos() method that returns a List<Foo> . In Java, all classes extend the parent class Object . List is an interface that extends the interface Collection , which in turn extends Iterable . All of these are provided by the Java core and do not require programming. However, they have methods that can be used or overridden. Interface hierarchy may be necessary to be known, for example a method that takes an Iterable<Foo> will accept a

How to check SysML stereotypes with Acceleo?

偶尔善良 提交于 2019-12-11 04:59:41
问题 I'm using Eclipse 4.6.3 (Neon.3) with Acceleo 3.6.6, Paprus 2.0.3 and Papyrus SysML 1.4 0.10.1. How can I check from an Acceleo MTL script, whether a class of my model has the SysML Block stereotype applied? The method getAppliedStereotypes() only works for my own defined stereotypes but not for SysML 1.4 ones. In my UML model (Papyrus project) I have created "Class1" to which I have applied my own stereotype "MyProfile::MyStereotype" created in the "Model Explorer" via "Profile"/"Update

Are UML relationships «use» and «include» same?

北城余情 提交于 2019-12-11 04:52:32
问题 Are the relationships «use» and «include» same in use case diagrams? 回答1: «use» is NOT a standard element of use case diagram. But UML standard allows using foreign diagrams elements. So, you can formally use «use» element that normally belongs to class diagram elements and is a sort of Dependency. Its meaning is: A Usage is a Dependency in which one NamedElement requires another NamedElement (or set of NamedElements) for its full implementation or operation. The Usage does not specify how