FAQ Database Discussion Community

UML Class Diagram - A user can't send a message to another user if he's not interessted in his offer

As the title mention, i have 3 classes : User, Offer, Message. There is a constraint : A user can't send a message to another user if he's not interessted in his offer. How do i model this case?! where i should add the proper attributes?!

Hashmap in UML diagram?

I want to write a class diagram for a class that contains a hashmap. Normally, I would do this: But my Map looks like this: private Map<Beacon, String> beaconRoute; The key is a custom class. How can I describe it in an UML diagram?...

UML diagram - method with multiple arguments?

Say for example I have a method(constructor) as follows: public animals(String a, String b, String c, int d){ When creating a written UML diagram, would I have to write String three times within the parameters or just once?...

System Sequence and interaction diagrams (UP)

I can't really figure this out. I'm reading a book about object oriented analysis and design (and UML) where UP metholodogy is being applied. I came across a question: If you make a system sequence diagram (SSD) do you need to create an interaction diagram for every call in that...

Enterprise Architect - Cancel Connectors Bridges

This might be a silly question but still - when two connectors cross each other the EA creates a bridge. Any way to cancel that so it'll basically be two straight lines crossing? Thanks....

How to represent implementing Interface in Sequence Diagram

I am beginner in UML and now I am creating one sequence diagram, problem is I would like to implement DAO interfaces according to user input. How can I draw correctly for implementing Interface in sequence diagram.

Need help in a login sequence diagram

hi everyone i'm à newbie in uml and my question is simple:i want to draw a sequence diagram for members login and the steps are as follows: the member visits the login page enters email/pwd clicks login then the system goes to the database if record exists if account active...

ForAll and filter with Iterator in OCL

I need to do 2 functions in OCL that work on collection: forAll and filter. The trick is I can only use iterator. This is what I come with: context Collection(T)::forAll(expr) : Boolean body : self -> iterate(t: T, acc: Boolean = true | expr(t) and acc) context Collection(T)::filter(expr) :...

What are the differences between an arrow and a closed arrow in UML to C#?

For example I hae a class Sensor a Class Control and a Class Rooksensor. I have an open arrow from Control to Sensor and a closed arrow from Rooksensor to Sensor. Here is what the UML-diagram looks like: A little guess I did was that in the class Rooksensor its...

Ordered Bag in UML

When a UML Class diagram association takes <orderedSet> annotation, it seems it means there is an order (yet unknown) between the elements at the end of the association. For example: A ---> <orderedSet> B means that for each a:A, its associated set of elements from B are ordered (e.g., a...

Represent/illustrate communication between two seperate programs in UML?

Lets say i have a Android app that communicates with a desktop program via Bluetooth sockets. pseudo code: On Android: class sendToDesktop{ sendMsg(String msg){ socket.send(uuid, msg) } } On Desktop: class Read{ getMsg(){ return socket.read(uuid, msg) } } So how do i represent the relationship between these seperate programs in...

how to fix a simple error on xtext?

this is my example to show you the problem I need to call two rules generate umlDsl "http://www.xtext.org/example/umldsl/UmlDsl" Model: elements+=rule* ; rule: rul1 'and' rul2 ; rul1: 'rul1' action1=[uml::Action|FQN] ; rul2: 'rul2' action2=[uml::Action|FQN] ; FQN returns ecore::EString: ID ("." ID)* ; I have this error Multiple markers at this line...

Java/UML Programming

I was on YouTube learning something new called UML programming. I made my own example through code in Java but how would it look like if it was "digital UML"? While understanding how this means in terms of Java and from the UML aspect, I have no idea what "digital...

Use Case: Almost same use case, different actors

I have one use case "Transfer request" linked to two Actors (Analyst and Inspector). The scenario/exceptions/alternate flow are essentially the same, but for each actor the pre-conditions and post-conditions are different. The request has different states, and that final state and previous states differ depending on the actor that's calling...

UML - association or aggregation (simple code snippets)

I drives me crazy how many books contradicts themselves. Class A {} class B {void UseA(A a)} //some say this is an association, no reference is held but communication is possible Class A {} class B {A a;} //some say this is aggregration, a reference is held But many say...

Does Facebook use-case have one or more actors?

As a class project I must make 5 use-case diagrams after analyzing Facebook web page. My doubts arise when whether to include FACEBOOK as an actor or simply use the user as a single actor system. Overall, I've made my diagrams like this. Use-case create an account: http://i59.tinypic.com/2s63oe1.jpg Here the...

What underlying difference makes Node Instances appear different?

I have two similar (if not identical) node instances that are appearing differently in a deployment diagram (and anywhere else that I use them). I may have done some odd things in the past while beating EA into submission. But, now ... by pulling every lever I can imagine, I...

Describe associations in class diagram

I have the following classes: Article Address The relationships of those two classes are: Article 1->2 Address (1 and 2 are the multiplicities, so an article has two addresses (a pickup & delivery address). How can I show in the class diagram that those two associations to the address are...

How to understand use-cases in specific scenerio

I am drawing a diagram of use-case using ArgoUML, I have a scenario in which user can update status but after sign in to the application , in that sense i need to extends update status after sign in or make it a new separate usecase or generalize it. Thank...

Where to place a method which checks if two edges are parallel in a graph?

I'm divided as to where to place a method which checks whether two edges are parallel in a graph. In the UML class diagram seen below, I have placed my suggestions in notes. The figure depicts that a Graph consits of Edges and Vertices. Two edges are parallel if they...

UML tool for reverse engineering a Java Project [closed]

I am currently working on a Java project with "IBM Rational Software Architect"(Licensed Version) as an IDE .My task is to understand the code flow and need to prepare Technical Document as the project is very big (a lot of codes, classes, packages, etc) and undocumented. Since, the project is...

Sparx EA: What type of relationship created when a Component is added to a Node?

In this question (point #3), I asked about getting a Packaging Component recognized as contained by a Node (device or execution environment) on a deployment diagram. No direct answer. However, the answers to other points led me toward an alternative that seems simple in concept: manually create the relationship or...

How to represent this class relationship in UML? (java)

The following class is run to instantiate all the other classes for my program. I'm wondering how to represent the relationship between the StartHere class and the UI class in a structural UML diagram. import java.awt.EventQueue; public class StartHere { public static void main(String[] s) { EventQueue.invokeLater(new Runnable() { public...

UML diagram in XMI Format

My question is: is there a document or other that explains how to represent the elements of uml diagram in universal xmi format ( for example in the class diagram how te represent a class, attribute.... in xmi format)?

How to move a diagram between projects?

I'm a very basic user of EA. I never had the time to learn its terminology or features and therefore i only use it to create pretty basic (yet rather big) diagrams. Unfortunately my EA project file was updated by another person and now i need to move a diagram...

What is really different with FLOW CHART from ACTIVITY DIAGRAM?

I know activity diagram is more simple standardized support concurrent flows than a flow chart. But what is the reason I should use activity diagram rather than flow chart apart from those above points. I'm just started UML. And this point is unclear for me. Can anyone explain to me?...

UML - Use Case Diagram choices

I have heard conflicting things about this and just wanted to clarify. I have always thought that when constructing a Use Case Diagram, I only include the activities that will be carried out by the system. For example, if it were a bank atm, "User depositing money" would be included,...

How to represent visual studio embedded classes in a class diargam

I'm creating a class diagram for my project, which is a c# solution. I think that textbox, button, etc.. are represented in the attribute section of the class. I've used classes like Directory, StreamReader, etc... Should I represent them as normal classes? If so, what is the relationship between them...

UML-model class affectation

I am trying to model with UML this problem I have, that is a specific exchanger structure. I have the central class, Matrix, that has several circuits flowing through it, class Circuit. This matrix is a stack of passages (class Passage), in which circulates one or more circuits. One...

Laravel MVC application structure on UML class diagram

As shown in many examples, MVC architecture involves three classes - Model, View and Controller respectively. With this, it is simple to show MVC on UML class diagram. However, in Laravel the view is not a class directly, it is a page. Can you please tell me, how to display...

Observer pattern and stateful observable paradigm

During development process of an Android app I have come across this design puzzle I am not able to solve at the moment. I would appreciate any thoughts, workaround or clean solution :) I ll try to simplify it as much as possible: Everything starts with a common observer pattern...

Singleton design pattern and asynchrounous method with EF

I have a wpf application, in which I used EF as an ORM. I have many methods which called asynchrounously : public Task<double> GetSelectedOGCAvance2(int reference) { return Task.Factory.StartNew(() => { DataEntities _db = new DataEntities(); _db.Configuration.LazyLoadingEnabled = false; using (_db) { var dpcs = _db.ass_dpc_ogc.Where(x => x.ass_dpc_id_fk == reference).ToList(); return...

different ways of enforcing association relationship

For an association between two objects: If I have an "Office" object and a "Person" object. I would model that as an association and I've come up with the below example code as a means of enforcing it. But looking at it, there are a lot of things I would...

Is this UML Sequence Diagram for Desktop assistance system correct?

I want to make a client-server application to help users and control their computer within a LAN network. I have already started to learn UML, my question is: Are there any errors in my diagram? How can I draw a correct one? ...

How to describe C# yield return in UML sequence diagram?

For example, using System; using System.Collections; namespace ConsoleApplication { class A : IEnumerable { B b; public A() { b = new B(); } public IEnumerator GetEnumerator() { yield return b.FunA(0); yield return b.FunB(1); yield return b.FunC(2); yield return b.FunD(3); yield return b.FunE(4); } } class B { public int...

Conceptual Modelling - Is my drawing correct ?

I have a exam tomorrow and we have gotten a sample exam, but since there are no answers to this sample exam, Id thought Id ask here. So here we go, this is one of the questions Im not sure if ive done correctly: Q: Draw a conceptual model describing...

UML 2 sequence diagram symbols in UMLet?

I would like to know if there is any possibility of representing the UML2 Boundary/Control/Entity symbols of a Sequence Diagram in UMLet ? (http://www.uml.org.cn/oobject/images/seq02.gif) Do I have to write their java code myself or does it already exist somewhere ? ...

What is the corret use of use case diagram

What is corret use of this model .. the 1. or 2. ? ... or should have 1. extends instead of include ?

how to make a note with implementation in a UML class-diagram in visual paradigm

I have been looking around for this for ages, but could not find any way to link a UML note to an operation of a class or to display the provided implementation in the specification of an operation. The idea is illustrated in the picture. I tried to add the...

Interfaces in UML component diagram

In the UML class diagram the interface is equivalent to the interface concept in programming languages (a set of methods that the class that implement the interface should implement). I want to know if the interface in the component diagram has the same meaning. Are the interfaces mentioned in the...

Should I include special methods for a Python class UML?

I wonder whether or not to include special methods in Python such as __str__ or ___eq___, etc, in a UML diagram.

sequence diagram in a specific situation

Hello I'm studying sequence diagram. For example there are 2 actors, an actor is a trader who has an online shop. Another actor is a customer who buys the trader's products. How do I represent the situation when the trader is storing the products into a database or when the...

Is there any tool to generate uml diagrams for Ruby on Rails [closed]

I want to know whether any tool is available to generate uml diagrams based on the ruby class files. My Rails version: 2.3.14 Ruby version: 1.9.3p547 Thanks for the help...

What is the correct graphical representation of an empty UML class?

Most UML tools represent an empty UML class with empty fields for both, attributes and operations. But looking at the UML Infrastructure and Superstructure, there are a lot of empty classes shown as one single rectangle including the name of the class. But I cannot find a clear statement which...

having trouble with modeling use case diagram

Solved Ok, so i have a problem. I need to model a use case diagram for a new CMS system. the point is, there is a "superAdmin" who can do all the same stuff as the client (buyer of the website) and more. When I model this my Use case...

Activity Diagram for Game Functions/Interaction

I am creating an activity diagram for a game, although I am not sure if I am using the correct diagram. Is this the correct diagram to represent the functions of the game? Functions: The aim of the game is for the character to move around the screen to collect...

UML representation of PHP trait

I'm creating projects with Symfony2/Doctrine and try to implement traits. So far no problem on small tryouts, but I usually do UML class and sequence diagrams before deep in complex projects. What is the UML design object(s) to be used to symbolize PHP traits, which can be seen as far...

How to model optional actions on UML activity diagram

After searching the net and a couple of old fashioned books I own, I still haven't found my answer to how to model an activity for a specific use case. I am fairly new to UML and thus activity diagrams. The activity is Add hotel. This is fictional, but the...

how to represent Updates avtivity using UML

I am trying to create an activity diagram and i need to represent an update activity. So is it possible to do this in activity diagram or there is another alternatives to do so ??? thanks for your help. ...

Can association lines be merged in one line in UML?

Is it in accordance with the UML standard to merge a few association lines into one line, like on the attached diagram? ...

How to model an enumeration class?

An attribute of a class is an enumeration. How do i model this? Normally you do something like this: - name : string But how to do this with an enum? , what is the standard uml representation of enum ? ...

Sequence Diagram generator for Ruby or Ruby on Rails [closed]

Is there an application / gem / anything that can generate sequence diagram for Ruby method? I need to generate some sequence diagrams for a Ruby on Rails project and I cannot find anything that can help me. Thanks!...

Class diagram vs State diagram (UML)

Can someone give me an example of when is better to use State Diagram and when Class Diagram. Tnx in advance! For what type of software system would you use state machine diagrams to model functional requirements? For what type of software system is data modeling via UML class diagrams...

Relation between a Object Diagram and a Class Digram in MOF Layer terms

I want to express the relationship between object diagrams and class diagrams in terms of the MOF Layer Model. As an Object Diagram (OD) is an instance of a Class Diagram (CD), I conclude that an OD must be on a Layer below a CD (e.g. OD in M0 and...

Is there a convention for showing overridden methods in UML static class diagrams?

If class Human inherits some methods from superclass Mammal unchanged (such as laysEggs: () -> false) and overrides other methods (such as postsToStackOverflow : () -> true), is there any difference between how the different methods are indicated in portion of the UML static class diagram for Human? For example,...

What is the difference between precondition, postcondition and invariant constraints?

I am new to programming and this site and I am studying about some of the terminology for UML design and I am looking for a basic response. I looked up the definition of each of the terms but I am still trying to grasp the concept.

How can I represent a Python dictionary in UML?

I would like to know how I can represent a Python dictionary using UML. This dictionary is an attribute of a class called Digraph. The keys are of type Node, and the values are of type Edge.

create emf generated model from an uml model

I'm triying to create a graphical editor using eclipse gmf, based on an uml model, for this I created a .gnemodel file based on my uml model but I do not have the associations in the generated .ecore file I used eclipse papyrus to create the uml model and I...

Use case for multiple login option

I have a use case where user may log in via normal login, as well as social login such as Twitter, Google, Facebook. I draw the use case as below but not sure if it is correct. Login account ---extends---> normal login ---extends---> Twitter login ---extends---> Google login ---extends---> Facebook...

Data structure to capture Rails (or in general, in UML) models associations

I am trying to come up with a convenient data structure that would allow me to capture all associations among my Rails models (I already got all associations using some metaprogramming). Any ideas? The closest I got is a tree with the root node being a special node called root,...

Activity Diagram and SwimLanes

Should activity diagram include detailed information about how the system functions from the start of the application? Say for example i am making a swing application in which the app loads a JList with images when the application opens, so should i specify that in activity diagram even though user...

Can association between package and actor be made?

Can it be done like this? I know I can make one actor which generalize behaviour of two on the left, but I need to know if this case shown below is possible. ...

A composite class with an associative relationship to a separate class

Using modules and classes, what is the best way to define this class relationship? A commodity has zero or more price series' (aggregation), And a price series object is created by selecting part of an ExcelFile object. (An excel file object is an excel workbook that has been converted to...

Shortcut for denoting or implying getters and setters in UML class diagrams

In a UML class diagram, if a class has 5 private attributes that need to be mutable and readable, the UML gets pretty ugly with 10 get/set methods even without any of the class' interesting functionality: Ugliness aside, I feel like the UML should focus on the class' more interesting...

Why do Branch and Merge use the same symbol in UML Activity diagrams?

What is the rationale behind Branch and Merge using the same symbol? I find it confusing, because you can't rely on the shape to know whether there's a conditional going on or not. Is there some other standard symbol or symbol variation I can use? I would rather avoid connecting...

How to model tight coupling in UML class diagrams

As far as I know it is possible to indicate tight coupling in a component diagram by using the port notation and a straight line between them. Contrary to the ball and socket notation. How do I indicate tight coupling in class diagrams?...

Enterprise Architect edit Class Name before “::”

I used EA to import some source code. However, the name contains name::className. How can I get rid of name? If I highlight name::className it only displays className for editing?

How to represent database columns and instance variables in UML

I am using Ruby 1.9 and Rails 2.3. I am designing class diagrams for Model classes. I was stuck with two doubts. 1.How to differentiate database columns and instance variables in Class diagram variables section. 2.In Ruby Active record created setters and getters for database columns automatically, In this case...

UML Number of actors of a Use Case diagram

Is it possible for a use case to have more than one actor? And if it is, do you know of a good reference where I can find that information (book, webpage) because I am having a problem with a diagram I made for a test. Thanks.

UML default visibility

is there a default visibility in UML2 if I don't (want to) add one of the four reserved visibilities? As I know there is + for public, - for private, # for protected and ~ for package. Or is the default depend on the implementation language that should be used,...

In UML, do you include variables defined in methods?

I know the basic format of UML and I know you typically include the variables defined for the class. My question is, do you include variables that are defined within methods of the class? In my program I have two classes, BabyName and NameFinder. BabyName is an object and my...

Limitations of Packaging Components in Sparx EA?

I'm running into what I would say are some limitations with the Packaging Components in Sparx EA. I use them to aggregate a number of commonly-themed web services in a Package. To be specific, they are JAX-RS Web Services. I model the Resource as a Packaging Component and the invokable...

Papyrus UML: add a type to a property using a Profile (Metamodel Extension)

I'm defining a profile using Papyrus UML in Eclipse. I extended metaclass "Class" and "Property" with several Stereotype classes. I can see new Stereotypes in my actual model correctly. I want to do the same defining my own types in my profile to use them for properties inside classes in...

UML Activity Diagram for android project

I have created the below diagram and I wanted to know if the diagram that I have done is correct. The below diagram is based on an android application. When the application loads the user is given 3 button to select add, update and help. On click on add button...

Database tables for tennis court booking system

I'm trying to find the best implementation of class diagram and database structure for football court management. The system have three actors: Super Admin : manage everything with all privileged (web back-office) Court Owner : can create a Football Club that may have more than one stadium (web back-office) Player:...

UML: packages within packages

I am working on a UML package diagram, and was wondering: a lot of my packages have a related topic in common, so i put them into a more general package. When drawing the UML diagram, do I literally draw the packages within a larger package? Or, do I use...

about constraints in class diagram

Take the following class diagram: I want to model the following constraint: A member must not participate in several thesis defences programmed on the same date....

State Machine Diagram - Transition from all states

I build a UML state diagram and have a case where same transition to specific state exists from most of other states. What is the most elegant solution to draw it? Currently I though about two options: 1) Use junction pseudo-state with exit to my target state 2) Wrap source...

Representing LinkedLists in UML diagrams?

Wondering what is the format to represent this state of a class inside a UML diagram private LinkedList<String> list; Thanks for your time...

VS 2013 generated code from UML references error

I created an UML model about my data model with Visual Studio 2013 to manage the model easier and let the VS generate the source code of the model for me. Unexpectedly, I faced a strange issue you can see in the picture below. It says the references to the...

user-group aggregation relationship in UML

if a user can be part of many groups and a group can contain many users , in UML this relationship has to be represented as an Aggregation relationship? or we can just use a simple association ?

Component diagram for WAR file?

Let say there's web project which is packed as war file. That project has dependencies on several libraries. How to show those dependencies without specifying which inner component of that war file uses which library?...