uml

Seq Diagram Drawing try catch block in UML

对着背影说爱祢 提交于 2019-12-01 03:34:04
问题 I have a question, how can I draw try catch block in sequence diagram in UML? Can I draw the try as the normal case and the catch as the alternative case or no? I'm using Visio to dram the UML sequence diagrams. 回答1: UML sequence diagram lacks of being able to visualize exceptions. There are "workarounds" however, please refer to: Break Sequence Diagrams: Questions & Answers Stackoverflow answer 回答2: There is no standard way to model exception handling in a sequence diagram. Here is how I

How to represent generic parameter in UML method?

有些话、适合烂在心里 提交于 2019-12-01 03:09:59
I have to reverse engineer some classes from a Java application into a UML 2 class diagram. So far so good, I have found how to represent class templates for the whole class as proposed by Jon Skeet here: What is the correct way to represent template classes with UML? . With this info, I have reverse engineered a class like this: public class Foo<T> { //class fields and methods... } Now I have a dilemma trying to reverse engineer a class which only a method contains a generic parameter: public class OtherFoo { public <T extends Comparable<T>> boolean bar(T x, T y) { //fancy code goes here... }

UML class diagram: how to model relations about calling a method or starting an activity or service

橙三吉。 提交于 2019-12-01 02:43:50
问题 I'm creating my first Android app. I have avoided to label associations with user or system interactions (e.g. I have labeled starts instead startsWhenClick ; I have labeled starts instead startsWhenDetection ). However, after reading this, I'm considering to change the starts associations by << create >> dependencies. I'm confused! The app works as follow. When the app starts, LauncherActivity will call the methods of BaseActivity to start the activity marked in SettingsActivity (it could be

五分钟带你读懂UML类图

有些话、适合烂在心里 提交于 2019-12-01 02:39:20
目录 先看下面这张类图,包括了UML类图的基本图示法 1、类的表示 2、接口的表示 3、继承关系 4、实现接口 5、关联关系 6、聚合关系 7、合成(组合)关系 8、依赖关系 先看下面这张类图,包括了UML类图的基本图示法 ​ 1、类的表示 首先看那个‘动物’矩形框,它就代表一个类(Class)。 类图分三层,第一层显示类的名称, 如果是抽象类,则就用斜体显示 。第二层是类的特性,通常就是字段和属性。第三层是类的操作,通常是方法或行为。注意前面的符号, ‘+' 表示public, '-' 表示private,“#' 表示protected.” ​ 2、接口的表示 然后注意左下角的‘ 飞翔’,它表示一个 接口图 ,与类图的区别主要是 顶端有《interface》显示 。第一行是接口名称,第二行是接口方法。 接口还有另种表示方法,俗称棒棒糖表示法,就是唐老鸭类实现了‘讲人话’的接口。 ​ 3、继承关系 继承关系:使用 空心三角形 + 实线 表示 ​ 4、实现接口 实现接口:使用 空心三角形 + 虚线 表示 ​ 5、关联关系 企鹅需要“知道” 气候的变化。当一个类“知道” 另一个类的时候,可以使用 关联。关联关系用实线箭头表示。 (在“企鹅”类中有一个属性为“气候”对象) ​ 6、聚合关系 我们再来看大雁与雁群这两个类,大雁是群居动物, 每只大雁都是属于一个雁群,一个雁群可以有多只大雁

Is it possible to embed Cockburn style textual UML Use Case content in the code base to improve code readability?

你离开我真会死。 提交于 2019-12-01 02:25:41
问题 experimenting with Cockburn use cases in code I was writing some complicated UI code. I decided to employ Cockburn use cases with fish,kite,and sea levels (discussed by Martin Fowler in his book 'UML Distilled'). I wrapped Cockburn use cases in static C# objects so that I could test logical conditions against static constants which represented steps in a UI workflow. The idea was that you could read the code and know what it was doing because the wrapped objects and their public contants gave

What is the best way to use UML 2.0 in Visio 2003?

你。 提交于 2019-12-01 02:19:30
问题 Visio 2003 uses UML 1.4, which means that some stereotypes from UML 2.0 simply don't exist, and they need to be modeled by freehand drawing (I may as well be using Photoshop). Does anyone know of an update from Microsoft or an addon to include UML 2.0 (complete - not just class diagrams) in Visio 2003? I found this package: http://www.sdl.sandrila.co.uk/ but judging by their "example" screenshots, I'm going to stay away. If they don't know how to use UML, I'd be surprised if they could

UML, include, extend relationship

怎甘沉沦 提交于 2019-12-01 01:51:37
I have trouble understanding how the include and the extend relationships work. Let's say i have an online application for shopping. The application allows you to add/retrieve items from your cart without being authenticated. Here is the "order" scenario: The client clicks on the order button. The system checks if the user is authenticated. If the user is authenticated the system displays the purchase page otherwise the user is redirected to the authentication page. I would like to know if i the "authentication" use case is included in the "order" use case and if so why ? (I'm asking this

UML图入门——学习《大话设计模式》笔记

回眸只為那壹抹淺笑 提交于 2019-12-01 01:31:32
《大话设计模式》中讲述了UML类图的基本用法,做此笔记加深理解。 注:上图来源于《大话设计模式》 上图中设计的关键术语为:继承、实现、聚合、组合、关联、依赖。 要想弄清楚UML图的原理,必须深入理解上述六大术语的基本含义。 继承表示: //鸟类 class Bird { public: void layeggs() { } private: string color; }; //大雁类继承自鸟类 class wildGoose : public Bird { public: void layeggs() { } void fly() { } }; //鸭子类继承自鸟类 class duck : public Bird { void layeggs() { } void swimming() { } }; 继承关系为is-a关系,上述关系中,大雁、鸭子、企鹅均属于鸟类,则其继承自鸟类,其中,箭头方向所指动物类。 实现表示:(在C++中继承自抽象类也选用此种表示方式) //动物类 class Animal { public: //声明了纯虚函数的类,都成为抽象类。 virtual void live() = 0; private: string food; }; //鸟类继承自动物类 class Bird : public Animal { public: void layeggs()

Server as an actor in use case diagram for mobile application

假如想象 提交于 2019-12-01 01:11:14
I have developed an android application that communicates with a server. Through the application the user authenticates on the system that the server is running and after the server is able to send information to my application. I'm making a use case diagram (UML) for my application but I'm not sure if I should represent the server as an actor (external) or omit it from the diagram... I'm new in UML so the definitions are a little confusing to me at the moment... Can anyone help me with this? (Sorry if this is not the right place to put those kind of questions). First off, who is the diagram

UML Use Cases: how to model a “batch” feature?

你说的曾经没有我的故事 提交于 2019-12-01 01:02:30
Should a batch scheduled process (for example, a nightly process) be modeled as a Use Case? it is something the system should do, but there is not an Actor "using" the feature, because it is scheduled. Any suggestions? Thanks! We've defined a 'Scheduler' actor to model that scenario. The Scheduler usually has its own set of use cases which are batch jobs, or executables that need to run regularly, etc. For example, the Use Case can be written like "The Use Case begins when the current time is on the hour" for a job that runs 24 times a day. We try not to include too many of these cases because