Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Sequence Diagrams

VIEWS: 30 PAGES: 9

									Sequence Diagrams




   4-10-2002
Opening Discussion

You will be presenting on the 24th. That
 gives you 2 more weeks to try to get a
 prototype implementation. The real key
 for the implementation is that it is going
 to tell you where your design needs work.
Your presentation is going to focus
 primarily on your design, but the more
 implementation you have, the better.
Back to UML

Today we are going to get back to talking
 about UML diagrams. We have discussed
 the Use Case diagrams for helping up with
 the analysis to figure out what users will
 be using various parts of our system and
 for what. We have also discussed class
 diagrams which show us the general
 layout of an object oriented design and
 help us see how pieces of code fit
 together.
Sequence Diagrams

Today we are going to look briefly at
 Sequence Diagrams These diagrams are
 used for individual methods to show us
 the passing of messages in a method.
In particular they show us the timing of
 how the different messages are passed
 (or methods are called if you prefer the
 terminology).
Layout of a Sequence
Diagram

The basic layout of a sequence diagram
 has the objects that receive messages
 listed along the top. Often the objects are
 denoted by just a class name.
The vertical axis has time advancing as
 you go down so the beginning of the
 method is at the top and the end is at the
 bottom. There is a “time line” down from
 each object as well.
Calling of Methods
When a message is passed to an object (a
 method invoked), we draw an arrow from
 the current method to a method on the
 line of that object. The arrow is labeled
 with the method name.
Boxes along the line represent the
 method execution. They are typically
 given a size that corresponds to how long
 their execution should take. Returns are
 implicit.
Asynchronous Messages

If you have code that spawns threads so
 that messages can be processed in
 parallel you can denote that in a
 Sequence diagram with a half arrow.
TogetherSoft has quite a few different
 options for the types of messages being
 passed. It will also generate Sequence
 diagrams from code. TogetherSoft shows
 an actor to initiate the call as well.
Look at Snipes Code
To help show the flexibility of the design
 of the project, I am also implementing a
 client/server pair for the game Snipes.
 Snipes used to ship with all Novell LANs.
 In some ways it was the first 3rd person,
 multi-player shooter.
I’m not very far yet, but I will continue
 with it and on Friday at 2:30pm I will
 work on it as part of a series on Java I
 have been doing.
Meet in Groups

As time allows I’d like you to break apart
 into your groups and discuss your
 projects. You should be turning in UML
 diagrams and group evaluations for them
 to me today. Your final presentations are
 in 2 weeks.

								
To top