1 / 14

dgchg

dffbfbfb

guest57520
Download Presentation

dgchg

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interaction Models (4) Sequence Diagrams

  2. Scenarios • A scenario is a sequence of events that occurs during the execution of a system, such as for a use case. • The scope of a scenario can vary: • It may include all events in the system • Or it may include only those events impinging on or generated by certain objects of the system. • A scenario can be: • A historical record of executing an actual system • Or a thought experiment of executing a proposed system • A scenario can be displayed as a list of text statements

  3. Sequence Diagrams • A text format is convenient for writing but it does not show clearly the sender or receiver of a message, specially when there are more than two objects. • A sequence diagram shows the participants in an interaction and the sequence of messages among them. • A sequence diagram shows the interaction of a system with its actors to perform all or part of a use case. • A sequence diagram may also show the interaction between objects (during a use case realization)

  4. Guidelines for sequence models • Prepare at least one scenario per use case: • Steps in the scenario should be logical commands. Not individual button clicks (during design/coding). • Start with the simplest mainline interaction: no repetitions, one main activity and typical values for parameters. • If there are different mainline interactions write a scenario for each one.

  5. Guidelines for sequence models • Abstract the scenario into sequence diagrams: • The sequence diagram clearly show the contribution of each actor. • It is important to separate the contribution of each actor before to organizing behavior about objects. • Divide complex interactions: • Break large interactions into their constituent tasks and prepare a sequence diagram for each of them. • Prepare a sequence diagram for each error condition: • Show the system response to the error condition

  6. Procedural Sequence Models • The UML has elaborations for sequence diagrams to show procedural calls. • Sequence Diagrams with passive objects: • In procedural approach, objects are passive. They don’t have their own threads of control. • A passive object is not activated until it has been called. • Once the execution of an operation completes returns to the caller the object becomes inactive. • The UML shows the period of time for an object’s execution as a thin rectangle. • The period of time when the object exists but is not active is shown as a dashed line.

  7. Procedural Sequence Models • Sequence diagrams with transients objects:

  8. Procedural Sequence Models • ObjectA is active : its activation rectangle spans the entire time shown in the diagram • ObjectB is passive during the entire time shown on the diagram • During part of the time ObjectB it perfors a recursive operation shown by the doubled activation rectangle. • ObjectC is created and destroyed during the time shown in the diagram.

More Related