3. Use Case Diagram
• Captures system functionality as seen by users
• Built in early stages of development
• Purpose
▫ Specify the context of a system
▫ Capture the requirements of a system
▫ Validate a system’s architecture
▫ Drive implementation and generate test cases
• Developed by analysts and domain experts
5. Sequence Diagram
• Captures dynamic behavior (time-oriented)
• Purpose
▫ Model flow of control
▫ Illustrate typical scenarios
6. Sequence Diagrams
A sequence diagram shows an interaction
▫ arranged in time sequence
▫ the objects (not the classes)
▫ the messages that pass between them
when an interaction occurs
8. Sequence Diagram
• Objects are shown in rectangles on the top of the
diagrams
• Each rectangle contains
▫ Name (always underlined)
[objects are underlined not class]
objectName:className
9. Sequence Diagram
objectName:className
•Below each object rectangle,
shown with a dotted line, is the
LIFELINE, of that object.
•A time-ordered visual
framework for message
exchange between the objects
(and with the system)
10. Sequence Diagram
• A narrow vertical line
called the ACTIVATION
represents the period of
time an object is actually
performing an action
▫ Directly
▫ Or through an intermediary
(such as another object)
objectName:className
12. Message Types
• Simple Message
▫ Control is passed from one object to another without
providing details
• Synchronous Message
▫ The sending object pause to wait for a result
• Asynchronous Message
▫ The sending object does not pause to wait for the result
• Return Message
▫ This message indicates a return from a procedure call
15. Collaboration Diagram
• The second interaction diagram is collaboration
diagram. It shows the object organization as shown
below. Here in collaboration diagram the method call
sequence is indicated by some numbering technique as
shown below. The number indicates how the methods
are called one after another. We have taken the same
order management system to describe the collaboration
diagram.
16. Collaboration Diagram(Cont..)
• The method calls are similar to that of a sequence
diagram. But the difference is that the sequence diagram
does not describe the object organization where as the
collaboration diagram shows the object organization.
• Now to choose between these two diagrams the main
emphasis is given on the type of requirement. If the time
sequence is important then sequence diagram is used
and if organization is required then collaboration
diagram is used.