OOAD-Unit-3
OOAD-Unit-3
: Custom er
Acto
r
Instance
s of
classes
Sequence Diagram: Lifelines
:actor :object1
Time :object2 :object3
:actor :object1
Time :object2 :object3
: Custom er
req uest( )
createObject3( )
Messag
create( )
e
An object
sends a
message to
Feedback itself.
arrow shows
that a value is
returned.
Sequence diagrams: endpoints
: Custom er
request( )
createObject3( )
create( )
X at the end of
the lifeline
shows that the
object ceases
to exist.
Sequence diagram: a more complex example
lookFor(title)
che ckVali dity()
checkAvailibility(title)
che ckAvaili bili ty(titl e)
createBookedItem s Lis t( )
create( )
add()
Sequence diagrams - strengths and
weaknesses
Strengths:
- they clearly show sequence or time ordering of
messages
- the notation is rather simple
Weaknesses:
- forced to extend to right when adding new
objects, consumes a lot of space
Use Cases and Actors
A use case
Specifiesthe behavior of a system
Represents a functional requirement of your
system as a whole
Describes what a system not how it does it
An actor
Represents users of use case play when
interacting with use cases
It’s not part of the system
Use Cases and Actors
Organizing Use Cases
Organize use case by specifying
Generalization
Include
The base use case pulling behavior from the
supplier use case
Extend
Pushing behavior to the base use case
Use Case Diagrams
A use case diagram
A diagram shows a set of use cases and
actors and their relationship
Contents
Use cases
Actors
relationships
Use Case Diagrams
Activity Diagrams
Activity diagrams represent the dynamics of the system.
They are flow charts that are used to show the workflow
of a system.
They show.
The flow of control from activity to activity in the system,
What activities can be done in parallel.
Alternate paths through the flow.
They can show the flow across use cases or within a use
case.
Core symbol is an activity.
Activity Diagram
An activity is some task which needs to be
done.
Each activity can be followed by another
activity (sequencing).
Triggers from the activity may be guarded
as in state diagrams.
Decision Activities
Diamond.
Each trigger coming from it has a guard.
Synchronisation bar.
All triggers from this attach to activities that can
occur in parallel, with no specific sequence, or
concurrently.
The next synchronisation bar closes the
concurrency.
Iteration is represented by a * on the trigger.
Activity Diagram Example
Swimlane
Arrange activity diagrams into vertical
zones separated by dashed lines.
Each zone represents the responsibilities
of a particular class or department.
Swimlane Example
Use Case Diagram:- Library Management System
Activity Diagram for Issue Book in Library
Activity Diagram for Return Book in Library:-
Collaboration diagram for issuing Book:
Collaboration diagram for returning Book:
Sequence diagram for issuing book:
Sequence diagram for returning book:
THANK YOU