You are on page 1of 54

OOAD through UML

Index
S.No Name of the program Page No
1. Introduction to UML 2-18
2. UML diagrams for Student Admission Procedure 19-24
3. UML diagrams for Automatic Teller machine 25-31
4. UML diagrams for Unified Library System 32-38
5. UML diagrams for Cellular Network 39-46
6. UML diagrams for Online Book Shop 47-53
1
OOAD through UML
WHAT IS UML
Th Unified Modelin Lanuae !UML" is a standard #anguag for $riting soft$ar
%#u&rints. Th UML is a #anguag for
- 'isua#i(ing
- )&cif*ing
- +onstructing
- ,ocumnting
th artifacts of a soft$ar-intnsi- s*stm.
Th UML is a&&ro&riat for mod#ing s*stms ranging from ntr&ris information
s*stms to distri%utd .%-%asd a&&#ications and -n to hard ra# tim m%ddd s*stms.
IMP!"TAN#$ !% M!&$LIN'
1" If $ $ant to %ui#d a dog hous/ $ith a #itt# &#anning/ $0## #i1#* nd u& $ith a dog
hous that0s rasona%#* functiona# and $ can do it $ith no on0s h#&.
2" If $ $ant to %ui#d a hous for a fami#*/ it0s going to ta1 a #ot #ongr. In this cas $
nd som dtai#d &#anning2 $0## nd to dra$ som %#u&rints/ %for $ #a* th foundation.
3" If $ $ant to %ui#d a high-ris offic %ui#ding/ $0## ha- to do 3tnsi- &#anning2
and $ nd a## sorts of %#u&rints and mod#s to communicat $ith on anothr.
WHAT IS A M!&$L
4 Mod# is a sim&#ification of ra#it*.
. %ui#d mod#s so that $ can %ttr undrstand th s*stm $ ar d-#o&ing.
. %ui#d mod#s of com&#3 s*stms %caus $ cannot com&rhnd such a s*stm in its
ntirt*.
Through Mod#ing/ $ achi- four aims
1. Mod#s h#& us to -isua#i( a s*stm as it is or as $ $ant it to %.
2. Mod#s &rmit us to s&cif* th structur or %ha-ior of a s*stm.
3. Mod#s gi- us a tm&#at that guids us in constructing a s*stm.
4. Mod#s documnt th dcisions $ ha- mad.
2
OOAD through UML
P"IN#IPL$S !% M!&$LIN'
5our %asic &rinci&#s of mod#ing ar
1" Th choic of $hat mod#s to crat has a &rofound inf#unc on ho$ a
2" 6ro%#m is attac1d and ho$ a so#ution is sha&d.
3" 7-r* mod# ma* % 3&rssd at diffrnt #-#s of &rcision.
4" Th %st mod#s ar connctd to ra#it*.
5" 8o sing# mod# is sufficint.

#!N#$PTUAL M!&$L !% UML
To undrstand UML/ *ou nd to form a conc&tua# mod# of th #anguag. This r9uirs
#arning thr ma:or #mnts;
I. <asic <ui#ding <#oc1s
II. =u#s
III. +ommon Mchanisms
!" BAS!C BU!L#!N$ BLOC%S
Thr ar 3 1inds of %asic %ui#ding %#oc1s
1. Things
2. =#ationshi&s
3. ,iagrams
1( T&!N$S in the UML
Thr ar 4 1inds of things in th UML
i. )tructura# Things
ii. <ha-iora# Things
iii. 4nnotationa# Things
i-. >rou&ing Things
3
OOAD through UML

1) Structural Thins
)tructura# Things ar nouns of UML mod#s. Thr ar 7 1inds of )tructura# things
a( # lass
4 c#ass is a st of o%:cts that shar th sam attri%uts/ o&rations/ r#ationshi&s and
smantics.

Class Name
Attributes
Operations()

)( !nterface
4n Intrfac is a co##ction of o&rations that s&cif* a sr-ic of a c#ass or com&onnt

c( Collaboration
+o##a%oration dscri%s co-o&rati- $or1 of an #mnt.
d( Use Case
Us +as dscri%s st of s9unc of actions that a s*stm &rforms that *i#ds an
o%sr-a%# rsu#t of -a#u to a &articu#ar actor.
UseCase
Actor
4
ISpelling
OOAD through UML
e( Acti'e Class
4cti- c#ass is :ust #i1 a c#ass %ut its #mnts ar connctd to othr c#ass #mnts.
f( Component
+om&onnt r&rsnts &h*sica# &ac1aging of #ogica# #mnts #i1 c#asss/ intrfacs and
co##a%orations.
Component
g( Node
4 8od is &h*sica# #mnt that 3ists at run-tim and ha-ing at #ast som mmor* and
&rocssing ca&a%i#it*.
Node
ii" Beha'ioral Thins
<ha-iora# Things ar th -r%s of UML r&rsnting %ha-ior o-r tim and s&ac.
Thr ar 2 1inds of <ha-iora# things

a" !nteraction
Intraction is usd to sho$ communication %t$n t$o o%:cts.
5
OOAD through UML
%" S tate Machine
)tat Machin s&cifis s9unc of stats of an o%:ct.

iii" Annotational Thins
4nnotationa# Things ar 3&#anator* &arts of UML. ?n#* 1 t*&.
Note
8ot is usd to gi- commnts to an #mnt or co##ction of #mnts.
Note

i-" $roupin Thins
>rou&ing Things ar th organi(ationa# &arts of th mod#. ?n#* on t*&.
(ackae
6ac1ag is a gnra# &ur&os mchanism for organi(ing #mnts or things into
grou&s or &ac1ags.
Package
6
OOAD through UML

2" )*LAT!ONS&!(S
Thr ar 4 1inds of =#ationshi&s in th UML;
a" #ependency* It is dnotd %* dashd #in $ith an arro$.
,&ndnc* is a r#ationshi& %t$n t$o things in $hich a chang to on thing
!Ind&ndnt thing" ma* affct th othr thing !,&ndnt thing".
MovieClip
name
screen()
start()
stop()
Channel
ependenc!
%" Association* It is dnotd %* a so#id #in.
++++++++++++++++++++
4ssociation is a structura# r#ationshi& that dscri%s a st of #in1s/ a #in1 %ing a
connction among o%:cts. 4ggrgation is a s&cia# 1ind of association/ r&rsnting a structura#
r#ationshi& %t$n a $ho# and its &arts.
c" $enerali+ation* It is dnotd %* a so#id #in $ith a ho##o$ arro$ had &ointing to th
&arnt
7
OOAD through UML
>nra#i(ation is a r#ationshi& in $hich th chi#d $i## shar th %ha-ior of th &arnt.
Shape
origin " Integer
displa!()
#ectangle
length " Integer
breadth " Integer
Circle
radius " Integer
d" )eali+ation* It is dnotd %* dashd #ins $ith a ho##o$ arro$ had.

=a#i(ation is a r#ationshi& %t$n c#assifirs/ $hr on c#assifir s&cifis a contract that
anothr c#assifir guarants to carr* out

3" #!A$)AMS
Thr ar 9 t*&s of ,iagrams in UML/ $hich ar c#assifid into 2 t*&s
i" Structural #iarams (static diagrams)
Ths ar of 4 t*&s
8
OOAD through UML
a" Class #iaram
4 +#ass diagram sho$s a st of c#asss/ intrfacs/ and co##a%orations and thir
r#ationshi&s. 4 c#ass consists of c#ass nam/ attri%uts/ o&rations and rs&onsi%i#itis.
Sta$$
S%name " String
College
name " String
location " String
collect $ees()
recruit $acult!()
epartment
%name " String
%code " Integer

%" Ob,ect #iaram
4n ?%:ct diagram sho$s a st of o%:cts and thir r#ationshi&s. Th* r&rsnt
sna&shots of instancs of th things found in c#ass diagrams.
S" Sta$$
S%name & '(!)'
C" College
name & '*+,+#+I+-'
location & 'Narsapur'
collect $ees()
recruit $acult!()
" epartment
%name & 'CS.'
%code " Integer & /0
9
OOAD through UML
c" Component #iaram
4 +om&onnt diagram sho$s th organi(ations and d&ndncis among a st of
com&onnts.
d" #eployment #iaram
4 ,&#o*mnt diagram sho$s th configuration of run-tim &rocssing nods and th
com&onnts that ar &rsnt in thm.
+om&onnt and ,&#o*mnt diagrams ar ca##d as 6h*sica# ,iagrams.
ii" ,eha-iora. #iarams !,*namic diagrams"
Ths ar of 5 t*&s
a" Use Case #iaram
4 Us +as diagram sho$s a st of us cass and actors and thir r#ationshi&s. 4n Actor
can % a human or a s*stm. Th ro# of actor is $rittn %#o$.

10
OOAD through UML
!nteraction #iarams
4n Intraction diagram sho$s an intraction/ consisting of a st of o%:cts and thir
r#ationshi&s/ inc#uding th mssags th* 3chang among thm.
2 t*&s of Intraction diagrams ar;
%" Se-uence #iaram
4 )9unc diagram is an intraction diagram that m&hasi(s th tim-ordring of
mssags. To sho$ intraction %t$n o%:cts $ us 3 t*&s of mssags.
Simple Messaes*
4 )im&# mssag sho$s ho$ contro# is &assd from on o%:ct to othr $ithout
dscri%ing communication in dtai# i.. $ithout indicating $hthr it is s*nchronous or
as*nchronous mssag.
Synchronous Messaes*
If sndr o%:ct $aits for a r&#* from rci-r o%:ct from dstination/ such mssags
ar ca##d )*nchronous mssags. @r/ on#* on o%:ct can snd a mssag at a gi-n instanc
of tim.
Asynchronous Messaes*
If sndr o%:ct continus 3cuting $hi# targt is &rocssing th mssag thn such
mssags ar said to % 4s*nchronous mssags. @r/ mu#ti&# mssags ar 3cutd at a tim.

Ob,ect Lifeline* 4n ?%:ct #if #in is -rtica# dashd #ins that r&rsnt th 3istnc of
an o%:ct o-r a &riod of tim.
.ocus of Control* It is r&rsntd %* rctang# that sho$s th &riod of tim during
$hich an o%:ct &rforms som actions.
11
OOAD through UML
c" Collaboration #iaram
4 +o##a%oration diagram is an intraction diagram that m&hasi(s th structura#
organi(ation of th o%:cts that snd and rci- mssags.

S" Student A" Admin
1" #e2uest $orm
3" give $orm
4" $ill $orm
5" submit
0" check $orm
6" eligible
d" State chart #iaram
4 )tat chart diagram sho$s a stat machin/ consisting of stats/ transitions/ -nts/ and
acti-itis.
12
OOAD through UML
*'ent* It rfrs to ha&&ning of an acti-it* at a gi-n tim and &#ac.
" Acti'ity #iaram
4n acti-it* diagram is a s&cia# 1ind of stat chart diagram that sho$s th f#o$ from
acti-it* to acti-it* $ithin a s*stm/ $hich ar connctd %* a triggr#ss transition. . can chc1
som conditions using dcision %o3/ $hich is dnotd %* a diamond.
13
OOAD through UML
Acti'ity/ It is a ma:or tas1 that must ta1 &#ac in ordr to fu#fi## an o&ration contract.
!nitial Acti'ity/ This sho$s th starting &oint of th f#o$. It is dnotd %* so#id circ#
.inal Acti'ity/ This sho$s th nd of th f#o$ in th acti-it* diagram. It is dnotd %* a so#id
circ# nstd in a circ#.
#ecision Bo0/ 4 &oint in an 4cti-it* diagram $hr a f#o$ s&#its into s-ra# mutua##* 3c#usi-
guardd f#o$s. It has on incoming transition and t$o outgoing transitions.
.orkin and 1oinin*/. us s*nchroni(ation %ar to s&cif* th for1ing and :oining of &ara###
f#o$s of contro#.
4 synchroni+ation bar is a thic1 hori(onta# or -rtica# #in.
4 .ork ma* ha- on incoming transition and t$o or mor outgoing transitions/ ach of $hich
r&rsnts an ind&ndnt f#o$ of contro#.
4 1oin ma* ha- t$o or mor incoming transitions and on outgoing transition.
Student
7isten
8atch
Success
9orking
:oining
s!nchroni)ation
bar
14
OOAD through UML
Swimlanes*
Th* ar usd to grou& r#atd acti-itis into on co#umn.
II" )UL*S
Thr ar 2 1inds of ru#s
1" .## formd ru#s
2" Lss-$## formd ru#s
1( 2ell formed rules/
Ths ar of 5 t*&s;
a" Names* .hat *ou ca## things/ r#ationshi&s/ and diagrams
%" Scope* Th contnt that gi-s s&cific maning to a nam.
c" 3isibility* @o$ ths nams can % sn and usd %* othrs.
d" !nterity* @o$ things &ro&r#* and consistnt#* r#at to on anothr.
" *0ecution* To run a mod#.
0( Less4well formed rules/
Ths ar of 3 t*&s
a" *lided* +rtain #mnts ar hiddn to sim&#if* th -i$.
%" !ncomplete* +rtain #mnts ma* % missing.
c" !nconsistent* Th intgrit* of th mod# is not guarantd.
III( #ommon Mechanism*
To ma1 our mod# sim&#r $ ha- to fo##o$ th fo##o$ing 4 common mchanisms;
a" Specification* 6ro-ids a## th &arts of th mod# that th s*stm shou#d contain.
%" Adornments* 6ro-ids -isua# r&rsntation of most im&ortant as&cts of th #mnts
c" Common #i'isions* 6ro-ids di-ision %t$n c#asss A o%:cts and intrfac A
im&#mntation.
15
OOAD through UML
d" *0tensibility Mechanisms* It is &ossi%# to 3tnd th UML in a contro##d $a*s.
Thr ar 3 mchanisms;
i" Stereotypes/ 4##o$s crating n$ 1ind of %ui#ding %#oc1s that ar dri-d from th
3isting on.
ii" Taed 3alues/ Usd to 3tnd th &ro&rtis of UML %ui#ding %#oc1s.
iii" Constraints/ 4##o$s adding n$ ru#s or modif*ing 3isting on.
A"#HIT$#TU"$ !% UML
4rchitctur is a st of dcisions a%out
1" Th organi(ation of soft$ar s*stm
2" Th s#ction of structura# #mnts
3" Th %ha-ior of ths structura# #mnts
4" Th com&osition of ths structura# #mnts
5" Th architctura# st*# that guids th organi(ation
16
OOAD through UML
4rchitctur of UML can % dscri%d using 5 -i$s
1( Use case 'iew/
It contains us cass that dscri% th %ha-ior of th s*stm as sn %* th nd usr. Th
static as&cts of this -i$ ar ca&turd in Us cas diagrams.
0( #esin 'iew/
It contains c#asss/ co##a%orations and intrfacs. This -i$ su&&orts th functiona#
r9uirmnts of th s*stm. Th static as&cts of this -i$ ar ca&turd in +#ass diagrams and
?%:ct diagrams.
1( (rocess 'iew/
It contains thrads and &rocsss that form th s*stms concurrnc* and s*nchroni(ation
mchanisms. This -i$ focuss on th &rformanc/ sca#a%i#it* and through&ut of th s*stm.
Th static as&cts of this -i$ ar ca&turd in +#ass diagrams and ?%:ct diagrams.
2( !mplementation 'iew/
It contains com&onnts and fi#s that ar usd to assm%# and r#as th &h*sica#
s*stm. This -i$ focuss on th configuration managmnt of th s*stm. Th static as&cts of
this -i$ ar ca&turd in +om&onnt diagram.
3( #eployment 'iew/
It contains th nods that form th s*stm hard$ar to&o#og*. This -i$ focuss on
distri%ution/ d#i-r* and insta##ation of th &arts that ma1 th &h*sica# s*stm. Th static
as&cts of this -i$ ar ca&turd in ,&#o*mnt diagram.
Th d*namic as&cts of a## th a%o- mntiond -is ar ca&turd in Intraction/ 4cti-it*
and )tat chart diagrams.
17
OOAD through UML
S!%TWA"$ &$4$L!PM$NT LI%$ #5#L$
UML is a &rocss ind&ndnt #anguag/ maning that it is not connctd to an*
&articu#ar soft$ar d-#o&mnt #if c*c#. To gt th most %nfit from th UML/ $ shou#d
considr a &rocss that is
- Us cas dri-n
- 4rchitctur-cntric
- Itrati- and incrmnta#
This us cas dri-n/ architctur-cntric/ and itrati- and incrmnta# &rocss can %
%ro1n into &hass. 4 (hase is th s&an of tim %t$n t$o ma:or mi#stons of th &rocss/
$hn a $##-dfind st of o%:cti-s ar mt/ artifacts ar com&#td/ and dcisions ar mad
$hthr to mo- into th n3t &has. Thr ar four &hass in th soft$ar d-#o&mnt #if
c*c#;
!nception is th first &has of th &rocss/ $hn th sd ida for th d-#o&mnt is
%rought u& to th &oint of %ingBat #ast intrna##*B sufficint#* $##-foundd to $arrant
ntring into th #a%oration &has.
*laboration is th scond &has of th &rocss/ $hn th &roduct -ision and its
architctur ar dfind. In this &has/ th s*stm0s r9uirmnts ar articu#atd/ &rioriti(d/ and
%as#ind.
Construction is th third &has of th &rocss/ $hn th soft$ar is %rought from an
3cuta%# architctura# %as#in to %ing rad* to % transitiond to th usr communit*.
Transition is th fourth &has of th &rocss/ $hn th soft$ar is turnd into th hands
of th usr communit*. Th &rocss rar#* nds hr/ %caus -n during this &has/ th s*stm
is continuous#* im&ro-d/ %ugs ar radicatd/ and faturs that didn0t ma1 an ar#ir r#as
ar addd.
?n #mnt that distinguishs this &rocss and that cuts across a## 4 &hass is itration.
!teration is a distinct st of acti-itis/ $ith a %as#ind &#an and -a#uation critria that rsu#t in a
r#as/ ithr intrna# or 3trna#.
18
OOAD through UML
Name of the Pro6ect ; Student Admission Procedure
Pro6ect Statement;
Th gi-n &ro%#m is to mod# th admission of a studnt in 6admasri ,r.<.'.=a:u
Institut of Tchno#og*.
%unctiona. "e7uirements*
Th +o##g 6ro-ids admission for th Student %* gi-ing th a&&#ication form
Th Administrator chc1s th a&&#ication form $hich is fi##d %* th studnts/ tsts
$hthr hCsh is #igi%# or not. 4ftr &a*ing f hCsh issus admission card.
Th #ashier co##cts th fs from th studnts and gi-s thir rs&cti- rci&t.
Use case &iagram*
give the $orm
check the application
administrator
give receipt
cashier
re2uest the $orm
appl! $or admission
$ill the $ee
collect admission card
student
$rom the
administrator b!
sho;ing receipt
cashier
collects it
19
OOAD through UML
&ocumentation*
!)6ecti-e; In th a%o- us cas diagram $ ha- thr actors/ studnt/ administrator and
cashir &rforming diffrnt o&rations/ r&rsntd %* th us cass for a## th thr actors.
The use case diagram is initiated studnt %* r9usting th form.
%.o8 of messages in rs&ons to $hich th administrator gi- th form/ th studnt fi##s th
form and su%mits it %ac1 to administrator2 h thn chc1s th form for #igi%i#it*. Thn studnt
&a*s th f and ta1s th rci&t.
The use case diagram terminates $ith th studnt co##cting th admission card.
A.ternati-e f.o8s; if th studnt is not #igi%# thn th us cas sto&s.
+#ass ,iagram
Cashier
name " String
id " String
collectcash()
givereceipt()
Administrator
name " String
id " Integer
give$rom()
checkappl()
giveadmcard()
update database()
Student
name " String
$name " String
address " String
dob " ate
$ill$orm()
re2 $orm()
pa!$ee()
coladmncard()
1++< 1
1 1++<
1++< 1
1++< 1
&ocumentation*
+#ass nam; )tudnt
4ttri%uts ;nam/ fnam/ addrss and do%
5unctions; fi##form/ r9form/ &a*f and co#admncard
=#ationshi&s ;association $ith administrator and cashir
20
OOAD through UML
+#ass nam ; 4dministrator
4ttri%uts ; nam/ id.
5unctions; gi-form/ chc1a&&#/ gi-admcard/ u&dat data%as.
+#ass nam ; +ashir
4ttri%uts ; nam/ id.
5unctions ; +o##ctcash/ gi-rci&t.
21
OOAD through UML
)9unc ,iagram
s"Student a"Administrator c"Cashier
submit application
veri$! the application
approved=re>ected
$ill the $ee
issue receipt
sho; the receipt
give admission card
re2uest $or $orm
give the $orm
22
OOAD through UML
+o##a%oration ,iagram
s"Student
a"Administr
ator
c"Cashier
5" veri$! the application
1" re2uest $or $orm
4" submit application
?" sho; the receipt
3" give the $orm
0" approved=re>ected
@" give admission card
6" $ill the $ee
A" issue receipt
23
OOAD through UML
4cti-it* ,iagram

not eligible
issue the $orm
re2uest $or the
$orm
$ill the $orm
check the
eligibilit!
receive the admission
card
pa! the amount and
receive the reciept
eligible
&ocumentation*
Th a%o- acti-it* diagram starts $hn th studnt r9usts for a form/ th
administrator issus on. Thn h fi##s th form and su%mits it %ac1 to th administrator.
Th administrator chc1s th form for #igi%i#it*2 if #igi%# th studnt thn &a*s th f to th
cashir and thn su%mits it to administrator to co##ct th admission card. In cas if th studnt is
not #igi%# thn th acti-it* diagram nds as thr is no othr acti-it* ta1s &#ac.
24
OOAD through UML
Name of the Pro6ect : Automatic Teller machine
Pro6ect Statement; Th gi-n &ro:ct is to mod# automatic t##r machin in $hich a
customr uss hisChr 4TM card to dra$ mon* from 4TM.
%unctiona. re7uirements;
Th 4TM machin &ro-ids faci#itis #i1 $ithdra$ amount/ chc1 %a#anc/ chang &ass$ord/
mini-statmnt/ and transfr of amount tc to customrs.
Us cas diagram;
displa! options (menu) screen
issue cash
s!stem
.nter pin no
Select option
.nter amount
Collect cash and card
customer
;ithdra;
mone!=change
pass;ord=etc+
displa! pin no screen
Insert card
25
OOAD through UML
&ocumentation*
!)6ecti-e; In th a%o- us cas diagram $ ha- t$o actors/ customr and s*stm &rforming
diffrnt o&rations/ r&rsntd %* th us cass for th atm s*stm.
The use case diagram is initiated $ith th customr insrting th card
%.o8 of messages* in rs&ons to $hich th s*stm dis&#a*s th &in no scrn. Th customr
ntrs th &in no. Th s*stm -rifis th &in no and dis&#a*s an o&tions mnu. Th customr
s#cts th o&tion h $ants!$ithdra$ mon* in this cas".5urthr th customr ntrs th
amount h $ou#d #i1 to $ithdra$. Th s*stm issus cash.
The use case diagram terminates $ith th usr co##cting th cash and th card.
A.ternati-e f.o8s ; In cas th &in no ntrd %* th customr is in-a#id/ h is dirctd to r-
ntring th &in no.
In cas th amount ntrd %* th usr is insufficint or out of #imit/ thn
th usr is dirctd to r-ntr th amount.
+#ass ,iagram;
Customer
name " String
addr " String
acct no " Integer
pin no " Integer
insert card()
enter pin no()
select option()
enter amt()
collect cash()
atabase
bank name " String
location " String
maintainacctdetails()
add cutomer()
del customer()
S!stem
S!stem id " Integer
location " String
displa! pin no screen()
displa! menu()
issue cash()
checkbalance()
1 1++< 1 1++< 1 1++< 1 1++<
26
OOAD through UML
&ocumentation*
+#ass nam; )*stm !4TM machin"
4ttri%uts; s*stm id/ #ocation
5unctions; dis&#a* &in no scrn/ dis&#a* mnu/ issu cash and chc1 %a#anc
=#ationshi&s; association $ith customr and data%as.
+#ass nam; +ustomr
4ttri%uts; nam/ addr/ acct no/ &in no
5unctions; insrt card/ ntr &in num/ s#ct o&tion/ ntr amt and co##ct cash
+#ass nam; ,ata%as
4ttri%uts; %an1 nam/ #ocation
5unctions; maintain acct dtai#s/ add customr/ d# customr.
27
OOAD through UML
)9unc ,iagram;
u " Customer s " S!stem d " database
insert card
displa! pin no screen
enter pin no re2uest pin no details
displa! options menu
select option
enter amount re2uest balance details
issue cash
sending
check
sending
check i$ balance is ade2uate
send card details
collect cash
update database
reload data
e(it
28
OOAD through UML
+o##a%oration ,iagram;
u " Customer
s " S!stem
d " database
A" check
14" check i$ balance is ade2uate
1" insert card
5" enter pin no
@" select option
1/" enter amount
10" collect cash
4" displa! pin no screen
?" displa! options menu
15" issue cash
1?" e(it
3" send card details
0" re2uest pin no details
11" re2uest balance details
16" update database
6" sending
13" sending
1A" reload data
29
OOAD through UML
4cti-it* ,iagram;
insert card
start
enter the pin
number
select the
account t!pe
select the
options
enter the
amount
collect the
amount
stop
collect card
valid
Invalid Pin no
insu$$icient balance
Su$$icient balance available
;ithin limit
7imit e(ceeds
no more transactions
$urther transactions
30
OOAD through UML
&ocumentation*
Th a%o- acti-it* diagram starts $hn th customr insrts his card. @ ntrs th
&in no on to th scrn. Th s*stm thn -rifis $hthr th &in no is -a#id. In cas it is not
-a#id th customr is as1d to r-ntr th &in no. In cas it is -a#id/ th customr s#cts th
account t*& h $ants to us and th o&tion !in this cas $ithdra$ing mon*".Th customr
thn ntrs th amount h $ants to $ithdra$. This is scrutini(d first %* chc1ing if sufficint
%a#anc is &rsnt in th account and scond if it is $ithin #imit. In cas %oth satisf*/ th cash is
issud to th customr. Th customr co##cts th cash. In cas h $ants to furthr s#ct som
o&tions h is &ro-idd $ith th o&tion to do so. If not/ h co##cts his card and th acti-it*
diagram sto&s.
31
OOAD through UML
Name of the (ro,ect * Unified Library System
(ro,ect Statement* Th gi-n &ro%#m is to mod# th unifid #i%rar* s*stm in 6admasri ,r.
<.'.=a:u Institut of Tchno#og*.
.unctional )e-uirements*
1. Th Li)rarian $i## ha- a com&#t accss to th s*stm as #istd %#o$.
6rmits to #ogin $ith uni9u rgistr id.
+an add n$ itms to data%as/ can d#t damagd itms from data %as.
+hc1 on transactions of %orro$rs and nsur chargs for o-rdu itms/ damagd and
#ost itms ar &aid. 7nsur d#a*s in rturning %orro$d itms ar not r&atd.
2. Th Mem)ers 9Staff and Students( ha- to #ogin into th s*stm and th* can sarch for
a &articu#ar %oo1. Th* can %orro$ a %oo1/ rn$a# a %oo1.
Us cas ,iagram;
librarian
Student
Sta$$
borro; book
return book
Member
login
search book
database
add book
delete book
get book $rom other dept+
check id card o$ student
BBincludeCC
BBincludeCC
BBe(tendCC
BBincludeCC
32
OOAD through UML
&ocumentation*
!)6ecti-e; In th a%o- us cas diagram $ ha- thr actors/ mm%r !studnt/ staff"/
#i%rarian and data%as &rforming diffrnt o&rations/ r&rsntd %* th us cass for a## th
thr actors.
The use case diagram is initiated $hn th mm%r #og0s into hisChr account.
%.o8 of messages th data%as chc1s #og in data and thn th mm%r sarchs for th
r9uird %oo1 !su&&os if th %oo1 is a-ai#a%#"/ %orro$s it/ aftr a crtain &riod of tim h
rturns th %oo1. Th #i%rarian chc1s th mm%r0s I, card %for issuing th %oo1. @ a#so
adds or rmo-s th %oo1 from th data%as.
The use case diagram terminates $ith th rturning th %orro$d %oo1.
A.ternati-e f.o8s; if th r9uird %oo1 is not a-ai#a%# thn th %oo1 is %orro$d from th
d&artmnta# #i%rar*/ $hr a#so th I, card is chc1d %* th #i%rarian.
33
OOAD through UML
+#ass ,iagram
&ocumentation*
+#ass nam; Mm%r !studnt/staff"
4ttri%uts ; id/ nam/ %orro$#imit/addrss/ fin amount
5unctions; %orro$%oo1s/ rturn%oo1s/ chc1 a-ai#a%i#it*/ &a*fin.
=#ationshi&s ;associatd $ith #i%rarian c#ass and %as c#ass for %oth )tudnt and )taff.
34
OOAD through UML
+#ass nam ; Li%rarian
4ttri%uts ; nam/ id/ addrss
5unctions; issu%oo1/ rn$%oo1s/ co##ctfins/ co##ct%oo1s/ addmm%rs/ addDn$itms/
d#t mm%rs/ rmo- itm.
+#ass nam ; 4rtic#s
4ttri%uts ; issudat/rturndat/ %oo1id/ a-ai#a%i#it*
=#ationshi&s; d&ndnt on Li%rarian c#ass
+#ass nam; Tit#s
4ttri%uts; itmDid/ &ric/ co&is/ tit#/ dition/ &u%#ications/ author/ rsr-dco&is/ issud
co&is.
5unctions; n$tit#s/ rmo-tit#s/ additiona#&urchass.
=#ationshi&s; d&ndnt on Li%rarian c#ass.
35
OOAD through UML
)9unc ,iagram
" 7ibrarian "7ending
8indo;
" -itles " Aarticles " Member
7ending details
validate $ind borro;ing limit
*orro;ing limit not e(eeded
9ind availabilit!
#e2uested items available
Update issue details
issue details updated
update book borro;ed
udated
36
OOAD through UML
+o##a%oration ,iagram
" 7ibrarian "7ending
8indo;
" -itles
" Aarticles
" Member
1" 7ending details
3" validate $ind borro;ing limit
?" update book borro;ed
4" *orro;ing limit not e(eeded
@" udated
5" 9ind availabilit!
0" #e2uested items available
6" Update issue details
A" issue details updated
37
OOAD through UML
4cti-it* ,iagram
log in
select a book
$rom the librar!
submit the librar!
card
Available
Search the book in the
departmental librar!
i$ not available
Available
Issue the book and return on
the prescribed date

&ocumentation*
Th a%o- acti-it* diagram starts $hn th mm%r #ogs in for a %oo1. Th mm%r
thn sarchs for a %oo1. If th %oo1 is a-ai#a%# h ta1s it/ in cas if not a-ai#a%# thn h ta1s
th %oo1 from th d&artmnta# #i%rar*. Thn th h su%mits th #i%rar* card to th #i%rarian. @
38
OOAD through UML
chc1s th card and thn issus th %oo1 to th mm%r. Th mm%r rturns th %oo1 on th da*
s&cifid %* th #i%rarian.
Name of the (ro,ect* Cellular Network
Pro6ect Statement; Th gi-n &ro%#m is to mod# th c##u#ar nt$or1
%unctiona. "e7uirements*
User can ma1 a ca##/ rci- a ca##. Usr can a#so do additiona# actions $hi# rci-ing
a ca## #i1 rci- additiona# ca## and $hi# ma1ing a ca## usr can &#ac a confrnc ca## tc.
Net8or: shou#d su&&ort usr to &rform a%o- mntiond actions. 4nd it shou#d chc1
usr 6hon num%rs and thir %a#anc amount.
To8er rci-s signa# from usr and snds it to dstination usr.
39
OOAD through UML
Us cas ,iagram
40
OOAD through UML
invite $or con$erence
accept the con$erence
veri$! number
balance en2uir!
Net;ork
ial a number
BBe(tendCC
re2uest $or connection
Dears the ring
Continues the conversation
disconnect call
recieve the call
Customer
BBe(tendCC
re2uest the destination to;er
connect the destination to;er
-o;er
&ocumentation*
41
OOAD through UML

!)6ecti-e;In th a%o- us cas diagram $ ha- thr actors/ customr/ To$r and 8t$or1
&rforming diffrnt o&rations/ r&rsntd %* th us cass for th c##u#ar nt$or1.
The use case diagram is initiated $hn th customr rci-s ca## or dai#s a num%r to ma1
a ca##.
%.o8 of messages*in rs&ons to $hich th customr acc&ts th ca## or $aits for th anothr
usr to acc&t th ca##. Th usr can chc1 %a#anc/ snd sms during th con-rsation. Th
nt$or1 -rifis th num%r and %a#anc. Th to$r ma1s th connction %t$n th t$o
usrs.
The use case diagram terminates $hn th ca## is disconnctd %* ithr on of th usrs.
A.ternati-e f.o8s ; In cas th num%r dia#d is $rong or %us*/ th customrs ha- to rdai# or
$ait ti## th usr is a-ai#a%#.
)u&&os th %a#anc is #o$ or ni# th nt$or1s -rif* it and thn nd th
ca##.
+#ass ,iagram
42
OOAD through UML
out going call
sender number
destination number
re2uest $or call()
recieving the call()
sms
sender number
destination number
send the te(t message()
recieve the te(t()
mms
sender number
destination number
send the multi media()
recieve the multi media()
internet
user number
enter the site to be visited()
re2uest $or connection
user number
re2uest to the destination()
connecting the user()
database
user number
user name
bal
valid number o$ the sender()
valid number o$ the reciever()
out going calls()
balance()
options
op
mms()
sms()
out going call()
business sms()
internet()
recharge
user number
enter the 1? digit number()
-o;er
recieving the re2uest()
re2uesting the destination()
providing connection()
disconnecting the connection()
provide the balance en2uir!()
enter the 1? digit number()
balance
user number
balance amount()
user
user number
user name
dialing the number()
;aiting()
recieving $orm the user()
recharge()
balance en2uir!()
&ocumentation*
43
OOAD through UML
+#ass nam; Usr
4ttri%uts ; usr nam/ usr num%r.
5unctions; dia#ing th num%r/ $aiting/ rci-ing from th usr/ rcharg/ %a#anc
n9uir*.
=#ationshi&s; association $ith To$r/ ?&tions/ <a#anc/ =charg.
+#ass nam ; To$r
5unctions; rci-ing th r9ust/ r9usting th dstination/ &ro-iding connction/
,isconncting th connction/ &ro-id %a#anc n9uir*/ ntr 18 digits
8um%r.
=#ationshi&s; associatd $ith r9ust for connction/ d&nds on data%as.
+#ass nam ; ,ata%as
4ttri%uts ; usr nam/ usr num%r/ %a#
5unctions ; -a#id num%r of sndr/ -a#id num%r of rci-r/ out going ca##s/ %a#anc.
+#ass nam; ?&tions
4ttri%uts; o&
5unctions; mms/ sms/ outgoing ca##s/ %usinss sms/ intrnt.
)9unc ,iagram
44
OOAD through UML
t"-O8.# u"US.# n"N.-8O#E
dial the number
re2uest $or connection
re2uest the destination
provide the connection
continue the conversation
disconnect the connection
balance en2uir!
update the balance
e(it
+o##a%oration ,iagram
45
OOAD through UML
t"-O8.#
u"US.#
n"N.-8O
#E
1" dial the number
0" continue the conversation
4" re2uest the destination
?" update the balance
A" balance en2uir!
3" re2uest $or connection
6" disconnect the connection
5" provide the connection
@" e(it
4cti-it* ,iagram
46
OOAD through UML
dial the no
process the
net;ork
give bus!
indication
bus! ringtone
increment the usage time
and update the balance
indicate no
balance
disconnect the
service
have balance balance out be$ore 1 min
no response till 4/ secs
response
&ocumentation*
Th acti-it* diagram %gins $hn th usr dia#s th num%r2 th nt$or1 chc1s
th num%r and %a#anc. If usr is %us* $ait/ If not thn $ait for th usr to acc&t th ca##. Th
nt$or1 chc1s th %a#anc fr9unt#*/ if %a#anc %#o$ th #imit thn/ disconnct th sr-ic. In
cas if %a#anc is a-ai#a%# thn $ait for th usr to com&#t con-rsation and nd th ca##.
Name of the (ro,ect * Online Book Shop
47
OOAD through UML
(ro,ect Statement* Th gi-n &ro%#m is to mod# on#in %oo1 sho&.
.unctional )e-uirements*
+rat an on#in %oo1sho& $hr th user can rgistr himChr s#f and can ordr for
%oo1s and &a* th %i## during th d#i-r* of th %oo1s.
,oo: shop staff has to snd ordrd itms to th customr.
Us cas ,iagram;
Provide book in$ormation $or user
Collect in$o or mone! $rom the user
Speci$! means $or collecting book
Internet
7ogin in the ;ebsite
search $or availabilit! o$ re2uired
book
con$irm about selected book
Five !our debit or credit card
number
Collect book
User
&ocumentation*
48
OOAD through UML
!)6ecti-e;In th a%o- us cas diagram $ ha- t$o actors/ usr and intrnt &rforming
diffrnt o&rations/ r&rsntd %* th us cass for th on#in %oo1 sho&&ing s*stm.
The use case diagram is initiated $ith th usr E#ogs in0 in th $%sit.
%.o8 of messages*in rs&ons to $hich th s*stm dis&#a*s th %oo1s a-ai#a%#/ th usr
sarchs for a %oo1/ chc1s its a-ai#a%i#it*/ thn confirms th s#ction of th %oo1. Th s*stm
ta1s th information a%out th &a*mnt of mon*. Thn th s*stm gi-s th mans %* $hich
th %oo1 can % co##ctd
The use case diagram terminates $ith th usr co##cting th %oo1.
A.ternati-e f.o8s ; In cas th r9uird %oo1 is not a-ai#a%# th us cas trminats.
#.ass &iagram*
User
card no " 7ong
name " String
.nterU#7()
selectbook()
givecreditcardno()
collect book()
Internet
open re2uest site()
process user re2uests()
gather user data G send to *()
atabase
card no " 7ong
name " String
update book in$o()
update credit cardno()
update user in$o()
*ook dealer
eliver! book()
1++<
1 1
1
1++<
1
&ocumentation*
+#ass nam; Usr
49
OOAD through UML
4ttri%uts ; +ard no/ nam.
5unctions;7ntr Ur#/ s#ct %oo1/ gi- crdit cardno./ co##ct %oo1.
=#ationshi&s ; ,&nds on %oo1 da#r and intrnt.
+#ass nam ; Intrnt
5unctions; o&n r9ustd sit/ &rocss usr r9usts/ gathr usr data and snd to ,<.
=#ationshi&s; d&nds on ,ata%as
+#ass nam ; <oo1,a#r
5unctions ; <oo1 d#i-r*.
=#ationshi&s; ,&nds of ,ata%as.
+#ass nam; ,ata%as
4ttri%uts; +ard no/ nam
5unctions; U&dat %oo1 info/u&dat crdit cardno/ u&dat usr info.
)9unc ,iagram
50
OOAD through UML
User Internet *ook dealer atabase
#e2uest U#7
ispla! re2uest Page
Select book
#e2uest $or credit cardno
Submit details and cardno
Update user in$o
vie; re2uests
Collect book $rom book dealer
+o##a%oration ,iagram
51
OOAD through UML
User Internet
*ook
dealer
atabase
1" #e2uest U#7
4" Select book
0" Submit details and cardno
3" ispla! re2uest Page
5" #e2uest $or credit cardno
?" Collect book $rom book dealer
6" Update user in$o
A" vie; re2uests
4cti-it* ,iagram
52
OOAD through UML
ispla! ;elcome
message
ispla! item
in$ormation
con$irm book
selection
create order $rom
shipping cart
displa! order
ship to
customer
accepted
re>ected
i$ re2uired book not $ound
9ound
&ocumentation*
53
OOAD through UML
Th acti-it* diagram %gins $ith th usr #ogging in hisChr account. Th s*stm
dis&#a*s th #ist of a-ai#a%# %oo1s/ th usr sarchs for th r9uird %oo1. In cas th %oo1 is
not found thn th acti-it* trminats. If found thn th usr &#acs an ordr and thn ma1s th
&a*mnt using hisChr crdit card. Thn th s*stm confirms th ordr and th dtai#s a%out th
mans of co##cting th %oo1s ar s&cifid to th usr.
54

You might also like