Professional Documents
Culture Documents
Part B - Case Tools-Uml - Lab: Usecase Diagram
Part B - Case Tools-Uml - Lab: Usecase Diagram
INTRODUCTION:
USECASE DIAGRAM:
A behavioral diagram that shows a set of use cases and actors and their relation ships.
USECASE:
Actor:
It specifies a coherent set of roles that users of use cases play when interacting with these use
cases.
CLASS DIAGRAM:
A structural diagram that shows a set of classes, interfaces, collaborations, and their
relationships.
OBJECT DIAGRAM:
A structural diagram that shows a set of objects and their relationships.
SEQUENCE DIAGRAM:
A behavioral diagram that shows an interaction, emphasizing the time ordering of messages.
COLLABORATION DIAGRAM:
A behavioural diagram that shows an interaction, emphasizing the structural organization of
the objects that send and receive meassages.
STATECHART DIAGRAM:
A behavioural diagram that shows a state machine, emphasizing the event-ordered behavior
of an object.
ACTIVITY DIAGRAM :
DEPLOYMENT DIAGRAM:
Deployment is the stage of development that describes the configuration of the running
system in a real time environment.For deployment,decisions should be made about
configuration parameters,performece,resource allocation ,distribution and concurency.The
component develop or reused should be deployed on some set o f hardware for
execution.Nodes are used to model the topology of the hardware on which the system
executes.A node usually represents a processor or a device on which components can be
deployed
Manage Titles
Manage Items
Manage Borrowers
Manage Librarians
Assume Identity of Borrower
The outline of the basic flow for the use case Checkout Item (which means that a Borrower
can check out an Item) is described as follows:
1. The borrower chooses to perform a Search for desired titles/
2. The system prompts the borrower to enter Search criteria.
3. The borrower specifies the search criteria and submits the search.
4. The system locates matching titles and displays them to the borrower.
5. The borrower selects a title to check out.
6. The system displays the details of the title, as well as whether or not there is an
available item to be checked out.
7. The borrower confirms that he or she wishes to checkout the item.
8. The system checks out the item.
9. Steps 1 to 8 can be repeated as often as desired by the borrower.
10. The borrower completes checkout.
11. The system notifies a librarian that the borrower has concluded the checkout item
session and displays instructions for the borrower to collect the contents.
Registered
User
Login
Librarian
Browse
Manage Borrowers
Manage Items
Remove reservation
Borrower
Make Reservation
Manage Titles
Master
Librarian
Search
Checkout Item
Return Item
Manage Librarian
Fig:
librarian
+1
+1..*
L_VISITORS
v_name
time
refers()
+1
+0..*
visits
LIBRARY
lib_name
lib_add
+1
+1..*
associated with
timings()
+1
L_STAFF
sta_name
sta_desig
sta_id
lend()
maintain()
log()
+1..*
maintains
is member of
+0..*
L_MEMBER
mem_name
mem_add
no.books
take()
visit()
read()
+1..*
+1..*
uses
+1..*
L_BOOKS
bk_name
bk_id
no.copies
Reservation
makes
Borrower
can Borrow()
0..*
references
checks out
Title
0..*
name : String
Loan
creationDate : Date = currentDate
getLendingTime()
1
Item
0..*
id : integer
Book Title
lendingTime : Days = 30
Magzine Title
lendingTime : Days = 10
:Return item
: Borrower
1: specify criteria()
2: search()
5: select title()
:Return item
Controller
:Title
:Borrower
:item
3: search(criteria)
4: get matching(criteria)
6: get item(title)
7: get item()
8: select item()
9: return()
10: return(item)
:Borrow
er
4: get matching(criteria)
7: get item()
:Title
13: set status()
:item
3: search(criteria)
6: get item(title)
10: return(item)
5: select title()
1:8:specify
selectcriteria()
item()
2:9:search()
return()
:Return
item
: Borrower
10
: Borrower : CheckoutItemForm
:
CheckoutItemCont...
: Title
: Borrower
: Item
1: specify citeria()
2: search()
3: search(criteria)
5: select title()
6: get items(title)
4: get matching(criteria)
7: get items()
8: select item()
9: checkout()
10: checkout(item)
11
1: Specify criteria()
2: Search()
5: select title()
8: select item()
9: checkout()
: Item
: :Borrower
: checkoutItemForm
3: search(criteria)
6: getitem(title)
10: checkout(item)
: Borrower
4: getmatching(criteria)
7: getitems()
:
checkoutItemController
: Title
12
13
: UserLocator
:EmployeeActor
: EmployeeLoginUI
: LoginWorkflow
: User
displayLoginForm()
submitName AndPassword()
validateLogin()
findbyName()
NULL( )
INVALID
displayErrorMessage()
14
9: displayErrorMessages( )
1: displayLoginForm( )
2: submitNameAndPassword( )
: EmployeeLoginUI
:
EmoloyeeActor
3: validateLogin( )
8: INVALID
7: INVALID
: User
6: validateLogin( )
5: USEROBJECT
: LoginWorkFlow
4: findByName( )
: UserLocator
15
student
librarystaff
submit
Application
librarian
verify details
Issue cards
staff
submit
application
3 cards
Take cards
borrow
Renewal
take cards
check for
reference
non ref
ref
borrow
books
issue books
Return
Reference
search another
book
take the
book
type of
transaction
return books
search
books
update
members book
16
Available
entry/ Number of reservations = 0
Reserved
17
not reserved
Entry:reservation num=0
reserved
reservation removed/reserved copies--
Component diagram :
Component diagram for library application :
Figure1:
Student issue
register.java
librarian.j
ava
item.java
Figure2:
18
itemmjr.ja
va
itemDAO.
mysql.java
itemDAO
.java
itemDAOA
cess.java
Figure 1:
19
student/staff
library
database
library
management
Figure 2:
<<processor>>
library system
<<processor>>
login server
<<processor>>
{book server}
<<processor>>
<<check out
20
Usecase diagram
lecturer a
amend student
find student
add student
check grades
delete student
21
<<include>>
maintain attendence
<<uses>>
<<include>>
<<include>>
performence
maintain subjests info
student
write examinations
pay fee
22
MAINTAIN CURRICULUM
<<include>>
maintain curriculum
<<include>>
<<include>>
update syllabus
maintain in take details
23
maintain circulam
registrar
Class diagram:
24
+1..*
University
uni_name
uni_code
uni_clz
has
Department
dept_name
dept_id
con_class()
con_exam()
admissions()
schedule()
+1
<<aggregation>>
+1..*
+1
<<aggregation>>
assigned to
+*
attend_class()
listen()
write_exam()
head of
reffered
member
Student
stu_name
stu_id
stu_add
stu_ph
<<aggregation>>
+1..*
+1..*
attends
Course
cou_name
cou_id
cou_type
+*
teaches
+1..*
Staff
staff_name
staff_id
staff_add
staff_ph
+1
take_class()
evaluate()
Class diagram:
25
Department
name
number
Fax num
HOD
find()
Delete()
Amend()
law
Scot
Student b
Module
Name
Adress
Student number
Gender
code
Module leader
level
name
Find()
add()
Delete()
Amend()
+has
1..*
+canTake
1..*
Find()
select()
change()
Allocate()
Sequence diagram:
26
student
application
interview
admission
1:send
2:attend
3:[pass] admit
Collaboration:
1: 1:send
student
application
2: 2:attend
3: 3:[pass] admit
admission
interview
27
Sequence diagram:
Department
Module
student
: lecturer a
1: find()
2: add()
3: Select()
4: list()
Collaboration:
1: find()
Departm
ent
: lecturer a
3: Select()
2: add()
4: list()
Module
student
28
ACTIVITY DIAGRAMS
start
calculate
percentages
if%>=75
yes
A grade
no
if 60<=%<75
yes
B grade
no
if %<60
no
yes
C grade
stop process
29
Create
Probatio
nal
Sucessfully completed 6 months period
Permane
nt
Resigned
Left
30
initialization
Do:initialize batch
cancel
cancelled Do:notify
registered students
cancel
cancel
open
Entry:Register students
Exit: increment student
[c=n]
close Do:finalize
batch
31
cancel
cancelld do:notify
registered students
Open
student
Entry:Register
Exit:Increment student
cancel
Grades
Do:> 75% 1st class
< 65% and > 50%2nd class < 50% & pass 3rd class
cancel
close
do:finalize batch
32
Component diagram
Departm
ent
Course
Student
Deployment diagram
Staff
Login
server
Studen
t
33
Case study 3:
Bank ATM SYSTEM:
Problem statement:-
34
changepin
session
customer
<<include>>
enquiry
Transaction
<<include>> verifycheque
depositcheque
transfer
<<include>>
<<include>>
<<include>>
withdrawl
<<include>>
<<extend>>
<<include>>
<<include>>
Deposite amount
<<include>>
verifymindetail
<<include>>
update balance
35
Bank server
customer
ATM card
card no : int
a/c no : int
card type : str
OWN
withdrawl()
deposit()
transfer()
view bal()
session
session id
a/c no
trans id
session()
a/c no : str
name : str
add : str
phone no : int
performs
bank server
operations
server_id : int
name : string
location : str
uses
valid pin()
change pin()
commit()
rollback()
create a/c()
delete a/c()
view details()
update details()
trans()
valid pin()
change pin()
Account
holds
Transaction()
no
trans_id
trans_type
amt
Acc_no : int
a/c_type : str
bal : float
commit()
rollback()
add()
commit()
add()
saving a/c
current a/c
36
37
customer
1: Insert card
: ATM
machine
: Bank
server
2: Obtain Pin
3: Enter Pin
4: Validate Pin
5: Valid Pin
6: Enter deposit amt
7: Deposit Amt
8: Open deposit slot
9: Insert Envelop amt slot
SEQUENCE DIAGRAM
38
COLLABORATION
custome
r
1: Insert card
3: Enter Pin
7: Deposit Amt
: ATM
machine
2: Obtain Pin
6: Enter deposit amt
8: Open deposit slot
9: Insert Envelop amt slot
10: Envelop recived
5: Valid Pin
4: Validate Pin
: Bank
server
39
customer
: session
: Bank
server
1: Insert Card
2: Obtain Pin
3: Enter Pin
4: Send Pin
5: Request
40
SEQUENCE DIAGRAM
custome
r
1: Insert Card
7: Type
3: Enter Pin
5: Request
6: Obtain types of enquiry
9: seif
: session
11: Current bal
13: Previous trans
15: Display(a/c no,bal,names)
: Bank
server
2: Obtain Pin
4: Send Pin
8: Get a/c no's
10: Bal enquiry
12: Transaction history
14: View a/c details
Enquiry collaboration:
COLLABORATION
41
: ATM
machine
customer
: Bank
server
1: Insert Card
2: Validate Pin
3: Validate
4: Choose Transaction
5: Withdraw
6: Check Balance
7: Sufficiant Balance
8: Creadit cash
9: Insufficiant Balance
42
COLLABORATION
custome
r
1: Insert Card
4: Choose Transaction
5: Withdraw
8: Creadit cash
10: Low balance
: ATM
machine
3: Validate
7: Sufficiant Balance
9: Insufficiant Balance
2: Validate Pin
6: Check Balance
: Bank
server
43
ACTIVITIY FLOW
customer
ATM
bank serv er
insert card
enter PIN
select
transaction
receive cash
:receipt
print
start transaction
validate PIN
:validation
[success]
:transaction
withdraw
close
transaction
44
idle
enter/pressed
ready
next
number
enter/pressed
validate
invalid
valid
transactions
complete
cancel pressed
cancel
cancelled
45
ATM
Machine
customer
account
withdraw
checking
account
balance
enquiry
bank
manager
saving
account
COMPONENT Diagram:
46
index.html
Parallel
port.exe
iput32.dll
cmd.exe
Deployement diagram:
Atm machine
location -A
console
Atm machine
location b
bank
server
47
Problem statement:
The cellular network must place the phone call currently,and also
schedule the receiving and conference calls.
Usecase diagram:
Cellular
system
Isdn Call
<<Generalization>>
<<uses>>
Local Call
<<uses>>
<<Generalization>>
<<Generalization>>
STD Call
<<uses>>
<<uses>>
Call Connect
<<uses>>
Services
<<uses>>
Miscellaneos
<<uses>>
<<uses>>
<<uses>>
<<uses>>
MSG Delivery
MSG Sending
GPRS
WAP
Other
Class diagram:
48
telephone line
telephone no
subscriber
name
adrdress
1..n
1..n 0..n
make a call()
1
+1
operator
chek bill()
register new sub scriber()
0..n
individual
ID
Organization
business registration no.
call
callee number
date
start time
end time
call details()
sequence diagram
49
Subscriber :
SampleModel
Telephone line
call control
:call
dial number
dial number
start call
create
replace telephone receiver
end call
set end time
collaboration diagram
call
control
Telephone
line
4: dial number
5: start call
8: end call
6: create
9: set end time1: lift telephone receiver
2: request number
3: dial number
7: replace telephone receiver
:call
Subscriber :
SampleModel
50
STATE DIAGRAM
initial state
on hook
idle
dial
on hook
talk
ready to
dial
busy
busy
connecting
ringing
destination
altered
51
Timeout
<Dial digit>
<After 15 sec>
DialTone
Idle
<dial>
Dialing
<dial invalid>
<Start>
Invalid
<Dial Valid>
Connecting
Toling
<busy>
<Calle Hung up>
Toling2
<Available>
Busy
Ringing
52
Lift telephone
receiver
dial number
[answered]
[busy or no one answers]
talk
replace telephone
receiver
53
Component diagram
Telephone
billingGUI
call
controlor
Billing db
server
:OPERATORPC
:Telephone swith
InterfacePC
:ServerPC
DEPLOYMENT DIAGRAM
54
Places Order
<<include>>
Center Delivery
<<uses>>
User
Order
Delivery
Operates Order
<<uses>>
<<Generalization>>
Home Delivery
<<include>>
<<Generalization>>
<<include>>
Check Password
<<include>>
Operator
Validation
Instant Order
<<include>>
<<include>>
Future Order
Check Availability
Place Order
Trace Order
55
Class diagram:
customer
number
name
address
places
1
1..n
request()
receive()
1..n
1
contains
1..n
orderline
number
quty
name
supplies
1..n
product
number
name
colour
unit price
order
number
date
type
for
1..n
1
1
stored in
1..n
ware house
city
phone number
add()
delete()
56
Sequence diagram:
customer
clerk
supplier
warehouse
place order()
chek product
request stock
product available()
deliver product
collaboration diagram
57
5: deliver product
clerk
customer
1: place order()
2: chek product
4: product available()
supplier
warehouse
3: request stock
customer sends an
order request
no
if order is
normal?
yes
confirm the
order
order is special?
yes
dispatch the
order
no
58
Idle
send order
request
normal quit
select normal or
special order
confirm event
failures
order
confirmation
complete transaction
diapatch
order
COMPONENT DIAGRAM
purchase
reorder
check
stock
balance
receive
order
place
order
DEPLOYMENT DIAGRAM:
59
ORDER
CUSTOMER
DATABASE
SERVER
60