uml

UML class diagram Association vs ( Aggregation | Composition )-Diamonds

萝らか妹 提交于 2019-12-18 11:56:53
问题 I am not sure if I do use the association and aggregation or composition diamond properly. I would use the Association for interfaces, because I can't instantiate them. Like they do it here for example. Or for static classes, same reason. And the diamonds I use only for objects I can instantiate. Like normal classes. But I am not sure if this is the correct way to differentiate them, because if you check again, you will see they aren't so specific about it. In the UML 2.3 specification I

UML association multiplicity

白昼怎懂夜的黑 提交于 2019-12-18 11:34:34
问题 I have a question about association multiplicity. I understand it, but for example if I would have: --------- --------- | |1 * | | |CLASS |----------| STUDENT | | | | | --------- --------- does that mean that at ANY point during system existence there must be at least 1 student assigned to the class, or those multiplicities should be true, if the system is operating normally? I am asking this question, because I was wondering about the moment of creation for an object. First we create an

Do you still use UML? How? What for? [closed]

淺唱寂寞╮ 提交于 2019-12-18 10:20:45
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Few years back everybody in our shop was crazy with UML . Now everybody seems to have cooled off. I am curious if there is still

终于明白六大类UML类图关系了

隐身守侯 提交于 2019-12-18 10:13:05
UML,全称Unified Modeling Language,统一建模语言。而UML图分为用例图、类图、对象图、状态图、活动图、时序图、协作图、构件图、部署图等9种图。 在面向对象语言中,我们经常看到有用UML类图去表示各种接口和类之间关系的。但是,每次看的都是云里雾里,搞不清楚那些虚线,箭头都是代表什么意思。今天,就让我们来一探究竟吧。 UML类图中有六种关系,分别是依赖关系,关联关系,聚合关系,组合关系,实现关系,泛化关系。 经过我自己的理解,画出了六种关系的示例图。类的成员变量和方法前面的修饰符有public, private, protected, default,在UML类图中分别用 +, -, #, ~表示。 一、依赖关系 依赖关系是一种使用关系,表示某个类依赖于另外一个类,通常表现为,某个类的方法的参数使用了另外一个类的对象。 在UML类图中,依赖关系用带箭头的虚线表示,箭头从使用类指向被依赖的类。下图中表示,程序员依赖于计算机来编写代码。 二、关联关系 关联关系是对象之间的一种引用关系,表示一个类和另外一个类之间的联系,如老师和学生,丈夫和妻子等。 关联关系有单向和双向的。在UML类图中,单向关联用一个带箭头的实线表示,箭头从使用类指向被关联的类,双向关联用带箭头或者没有箭头的实线来表示。 上图表示老师和学生之间的关系是双向的,一个老师可以有多个学生

What is the common way to represent this kind of diagram?

橙三吉。 提交于 2019-12-18 09:38:45
问题 I need to represent the payment of a customer to buy a flight ticket in an airport. The system of airport has a bonus system. So customer can make payment for ticket by a bonus or by another payment system or together. But I don't know how to represent it all together. I wanna make the interface that called PaymentMethod and make this hierarchy : ByPaymentSystem (Interface), ByBonuse (Class), ByMix (Class that dependet from ByPaymentSystem ) Payment system will also have many realizations f.e

UML diagram use case condition

♀尐吖头ヾ 提交于 2019-12-18 09:16:14
问题 I am creating use-case diagram. I have two actors: user and admin. Admin can check all orders, and user can check only his/her orders. Should I create two use cases in my UML diagram, or I can use one use case with condition for user actor? If I can use condition, which symbol must I use? Square brackets or curly brackets? 回答1: You need to attach a constraint to either the connector, the use case or the actor (where it's most appropriate). It could look like this: Note that this is an example

Use IntelliJ to generate class diagram

ぐ巨炮叔叔 提交于 2019-12-17 21:41:48
问题 How do I get IntelliJ 10.5 (on the Mac) to generate a class diagram showing all of the classes in my project? I'm sure I'm overlooking something obvious, but I can only get the "Show Diagram" feature to show one class at a time. (I also figured out how to add additional classes, but again, only one at a time.) 回答1: Use Diagrams | Show Diagram from the context menu of a package. Invoking it on the project root will show module dependencies diagram. If you need multiple packages, you can drag

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

流过昼夜 提交于 2019-12-17 20:29:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . 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

UML Class diagram C++ struct

ぃ、小莉子 提交于 2019-12-17 19:46:46
问题 How can I show struct members in the UML class diagram. In class diagram, I added struct as attribute and don't know how to add 'x', 'next' elements to that struct. if I generate the C++ from class diagram, it should have 'x' and 'next' elements in struct. class LinkList { private: // how to show the struct and its members in UML class diagram struct node { int x; node *next; }*p; public: // add an element void append(int num); // counts number of elements int count(); }; 回答1: something like

CRUD in a use-case diagram?

北战南征 提交于 2019-12-17 17:33:30
问题 My question is quite simple. What is the best way to bring CRUD into a use-case diagram? It should be DRY. I know, UML is sometimes discretionary, but what do you think about it? Some ideas: 1 use-case diagram Not really DRY, if there are a few CRUD objects. 2 use-case diagram Not really DRY, if there are a few CRUD objects. 3 use-case diagram I prefer this. Update 4 use-case diagram (@Uffe) Note maybe needless, when it is described in the documentation? 5 use-case diagram (@home @Uffe) 回答1: