1

I have an assignment to create UML class diagram of an Android project. I have successfully created most of the diagrams.

I got little bit confused when i was reading Activity code, I am unable to understand the relationship between two different Activites, that is created by intents.

kindly guide me how to create diagrams and define what type of relationship between 2 Activities. What i have understand is that, its not association, aggregation, composition or dependency, then what it is..Kindly guide me.

5
  • 2
    What do you mean by intents? UML does not have that. Commented Dec 5, 2015 at 21:25
  • Thanks for the reply..I mean to say that how to define the relationship between two Activities by using class diagram, as they are only connected by using Intents Commented Dec 5, 2015 at 21:42
  • 1
    You said that. But what is "intents"? Do you want to know in general how to link activities? Commented Dec 5, 2015 at 22:22
  • I want to know how to link activities in uml class diagram Commented Dec 5, 2015 at 22:28
  • See also Stack Overflow: Understanding Diagrams Commented Dec 6, 2015 at 8:13

1 Answer 1

3

You will usually not link activities as such. One activity represents a scenario in a use case. There must be at least one sunny day scenario. But you can have various other scenarios which will mostly on constraints (a common constraint is e.g. {must be logged on} or the like). So the activities are independent.

However, you can use activities for structuring a single scenario. In that case you would link with a ControlFlow which is represented as directed connector with an open arrow pointing towards the next activity.

You can make a structured activity which itself consists of sub-activities. This is shown by the lying 8 in the right SubActivity2.

enter image description here

In your comment you ask how to link it in a class diagram. You can link activities to classes with a simple dependency (class depends on activity). It is no common to mix behavioral features like activities in structural diagrams like class diagrams. But UML does not forbid that and there might be reasons to use it.

Sign up to request clarification or add additional context in comments.

6 Comments

Regarding "You can link activities to classes with a simple dependency," an Activity is ultimately a kind of a Class in UML 2. Thus, one can represent it as a Class with normal associations on a class diagram.
@JimL. UML2.5 defines Activities a specialization of Behavior, not as Class. See 15.2.2 on p. 372.
Correct. That's why I said, "ultimately." A Behavior is a kind of Class. See §13.2.2, Figure 13.1.
A large part of UML elements are derived from Class which is very basic. Behavior is more than Class. I would however not use an association (maybe a personal taste) which I reserve for connecting Classes. InformationFlow in contrast may well be used in conjunction of Class/Activity.
Are you thinking of Classifier?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.