2 Questions

3 views
Skip to first unread message

dushkin

unread,
Nov 6, 2006, 8:19:16 AM11/6/06
to * UML
Hi and good luck to the new group!

Two questions please:

1. What is the deifference between association link and dependecy link
in class diagram?

2. Did I understand correctly?

Use case diagrams help to model functionality.
Activity diagram help to describe use cases.
Sequence diagrams help to describe processes between actors (or
modules)


Thanks!

leon....@gmail.com

unread,
Nov 6, 2006, 12:34:46 PM11/6/06
to * UML
To save time I will answer the first question now and the second later
in the day.

>
> 1. What is the deifference between association link and dependecy link
> in class diagram?
>

In UML the concept of "dependency" is generic. It could mean that one
package requires the services or functionality of another package. Or
it could mean that some other UML entity relies on another for some
reason.

The Executable UML profile applies generic UML dependency in at least
two places, but with precise and restricted intentions. One usage is
on the class diagram and pertains to your question. The other is on
the domain diagram.

A class may "depend" on an association. If it does, this class is
known as an "association class". This means that each link on the
association materializes as an instance/object in the association
class.

Consider the example where we model a simple spreadsheet grid. We
might model the following association named "R1":

Row-1..*--intersects--R1--is intersected by--1..*-Column

Now we add an association class "Cell" which depends on the R1
association.

Cell----R1

(It occurs to me now that the UML symbol for dependency is ---> and the
association class connector is ---- (no arrow head). So, in fact,
"dependency" might not officially apply to association classes.)

So if we name our Columns (A, B, C...) and Rows (1, 2, 3...) some
objects in Cell might be A-1, B-1, ... A-2, and so on. In fact, in
this particular case the population of Cell would represent a cross
product of the Column and Row populations. This is not usually the
case for most association classes.

The important point is that you cannot have an instance in the
association class in absence of a corresponding link on the attached
association. So it would be illegal to have an instance of Cell ZZ-8
if column ZZ did not intersect row 8 (especially if 8 or ZZ did not
exist in the first place).

To provide further context, the concept of dependency is used on the
domain chart. Executable UML defines a stereotype (refined definition)
of Package called a "Domain Package". One Domain Package might depend
on another. For example:

Elevator Management ---> Motor Transport

That is to say that the Elevator Management domain requires services
provided by the Motor Transport domain. In this case, there is no
concept of a "link" as links are used only in class diagrams. There is
just the dependency.

Hope this answers your first question. I will take another break later
today and address the second in a separate post.

- Leon

leon....@gmail.com

unread,
Nov 7, 2006, 1:20:23 AM11/7/06
to * UML
Okay, on to the next question...

> 2. Did I understand correctly?
>
> Use case diagrams help to model functionality.
> Activity diagram help to describe use cases.
> Sequence diagrams help to describe processes between actors (or
> modules)
>

That's not exactly how it works in Executable UML. (UML maybe...)
Use case diagrams show how external systems or users interact with your
system as a black box. So you can use it to show the application
interface or high level interactions. If that's what you meant by
functionality, then you are correct. In the old days before UML we
called it a context diagram with an event list. Same idea. It is
important to note that the Use Case is not really executable (like a
statechart). It is just a way to help organize the requirements.

The activity diagram is not used in Executable UML. Instead, a text
action language built on UML 2.0 Action Semantics is used. The actions
are then encapsulated with each class and triggered by state
transitions. Activity Diagrams are like flow charts (about 90% the
same actually). We don't use them in Executable UML since they lead to
a functional rather than object oriented description of activity. So,
instead of an activity diagram to trace behavior, we end up with a
collaboration diagram showing object interactions with state charts and
text actions.

As for the sequence diagram, you are essentially correct. In
Executable UML they are used a couple of ways. Once you've built a
system, you can trigger the execution of a test case with an initial
event. The ensuing sequence of state transitions and object
interactions can be drawn as a sequence diagram. The sequence diagram
does not represent system structure, just the chronological activities
based on a set of initial conditions.

It is also sometimes helpful to draw a sequence diagram by hand to
predict system behavior and figure out what kinds of classes and
interactions might be necessary.

Hope this helps.

- Leon

dushkin

unread,
Nov 7, 2006, 6:04:44 AM11/7/06
to * UML
Many thanks Leon for your kind help!

Reply all
Reply to author
Forward
0 new messages