Author Topic: Sequence Diagrams  (Read 2275 times)

Si Perry

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Sequence Diagrams
« on: December 12, 2001, 06:31:17 am »
Where to start?   ???

I am very new to the UML and I have a few questions regarding sequence diagrams, some of them conceptual, others relating to the use of EA.

Hope someone out there can help (with any of the points).

Here goes.

1. Class B is subclassed from class A.

  Object Z creates object of class B. Do I show it creating B directly, or an object of class A that itself creates an object of class B?

2. Class B is subclassed from class A.

 Object Z sends message bob() to class B. But bob() is a virtual method, only present in the base class A. How can I show on the diagram that although bob() is invoked on B, it is an invokation of a base class method? Should I even be trying?

1. Is it possible to show object deletion without sending a message from another object (i.e. to show self-deletion)?
2. The activation box seems to be present for the entire lifetime of an object. Is it possible to only show the activation box for the lifetime of a method?
3. A class makes a self call. The called method makes further calls both to its parent class and to other objects. Is there any way to add messages from inside a self call?


  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagrams
« Reply #1 on: December 12, 2001, 08:25:42 am »

Regarding your first question I would say that you definitely create B directly.

Your next question is a bit tricky. I don't think that you should try doing it (you can't). Conceptually bob() is called on B and although it is not overrided in B any calls to other virtual methods would call methods in B (if overrided in B). So I think it is okay that it seems as if you call bob() directly on B.

EA Usage:
1. You can have an object send a destroy message to itself. Would this work for you?

2. I don't think so, haven't been able to find it myself.

3. In this case I would prefer to add an instance of the class twice to the sequence diagram and give show the that the two objects actually are the same instance by giving them the same name.