Rajeev Kumar, CSE, IIT - KGP 1
Rajeev Kumar, CSE, IIT - KGP 1
Rajeev Kumar
Rajeev Kumar, CSE, IIT - Kgp 1
Unified
Modeling
Language
Rajeev Kumar
CSE, IIT-Kgp
Use Case
A Use Case describes a set of sequences. Each
sequences indicates interaction of things
external to the system ( Actors ) with the
System.
A Use Case
• Is an interaction of Actors and Systems
• Executes tangible amount of work
Order Management
realization
actor
Customer
generalization
Industrial Customer
Rajeev Kumar, CSE, IIT - Kgp 4
Use Case
<< include>> stereotypes:
the base use case incorporates the behaviour of the target use
case. The included use case cannot survive by itself.
target
base
<< include>>
SearchRecord ReadDataBase
base target
<< extend>>
EOF Processing Record Read
base
<< extend>>
Invalid Record Processing
Update
Set Limits Accounts
Accounting
System
Trading Analyze Risk <<include>>
Manager
Price Deal <<include>>
Trader Valuation
Capture Deal
actor
<<extends>>
Salesperson
Limits
Exceeded
use case Rajeev Kumar, CSE, IIT - Kgp 7
Interaction
1 : login p : LoginProcess
Interaction Diagrams
Collaboration Diagrams
• Shows the relationships among objects
• Is better for understanding all of the effects on a given
object and for procedural design
• Shows an interaction organized around the objects in the
interaction and their links to each other
• Does not show time as a separate dimension
Rajeev Kumar, CSE, IIT - Kgp 11
Sequence Diagram
objects
grant_terminal()
timee
validate_user()
fork_user()
t : Terminal Message
2 : grant_terminal()
1 : request_terminal()
p : LoginProcess k : Kernel
5 : fork_user()
4 : validate_user()
Sequence
Rajeev Kumar, CSE, IIT - Kgp 13
Statechart Diagrams
A Statechart Diagram :
• Is used to model the dynamic aspect of a
system
• Shows a state machine
• Shows the states an object / interaction goes
through during its life
It consists of:
• States
• Transitions
Rajeev Kumar, CSE, IIT - Kgp 14
Statechart Diagrams
Action performed
ReadCharacter
before exiting state
entry / clearBuffer
Event NMI will exit / returnCharacter
trigger handleNMI NMI / handleNMI
do / waitForCharacter
While in this state do IRQ7 / defer
waitForCharacter
Reading Char
valid char
Idle
read opened eof
Opening Close
initial
Statechart diagram for reading CSE, IIT -Transition
a file
Rajeev Kumar, Kgp from substate 17
Statechart Diagrams
Power off
On
Bootup
concurrent states
Concurrent substates...
Rajeev Kumar, CSE, IIT - Kgp 18
Component Diagrams
Components :
component
component name
Os.dll
classes
component
Component 1 Component 2
Dependency Realization
Consists of :
•Nodes
•Dependency, Association & Relationship
Gateway
Cache Cache
Server Server
A Network
Deployment diagram
Primary Primary
Server Client
Server
Rajeev Kumar, CSE, IIT - Kgp 23
Packages
Actor
ReadTime
SetTime
WatchUser
WatchRepairPerson
Use case
ChangeBattery
WindowsGUI XGUI
GDI
DC XServer
HAL Widget