Uni 2 NoRestriction
Uni 2 NoRestriction
Uni 2 NoRestriction
AND DESIGN
ur{tT _ II
Intrcdudron to EraboEtion - oohain Modets _ Ftndtnq .on@ptuat
cta*s Denptlon
da$s - Asso.iations - Afribuies
Domaii modet rerjnement - Fr.dhg @neptuat
class
hleEmhres - Agqregaiton Comp6l on _
UfiL a.tivrty diaqraDs _ UML activtty modering
1. wh.r i. Er.bc:tion?
. Etaboradon onen @nststs of rwo o.
more treraUohs(2 ro 6 weeks durarron)
. Eaih,teEton B re oo,ed(t.e. End Dare nytuJ
t Etahoradon ts not Destgn pha*(I.e.
the modet is nor tuly dryetoped)
r Atso ir is not ihrow auay p.orotype,
Gther the @de aid d6isn aE producflon
.
subsequentiteEtioEwil!rcwonrhEroundation,
wlrat h.PpG In in@ption?
Inception ts a shod step to eraboratioh. it determrnes
bast. fasibitity, nsk and
scope, to d(ae ifthe proted is wodh more
lerious invGlqation
wh.t arc th. nkev adiviflq a.d .nif*r. in ln.eption?
. A short requiemenr workshop
Most actoE, goats and Use Ca*s named.
Most use es4 writsen tn brief fomat; 1_2o% of ce css wfren
l,l6t hfluentiatand risky quafiry requkehenrs jdenufied
supplmenrary specification wnnen (veEron one)
. Hagh Lever endidate Architectu.e frade (iot a detaired. nnar or cord dn.
. Used as srafttns point of hv6lg:tion (Es. a lava clent side appltion shn
no Apptietion sryer, a.d no oEde for Databa*
what .rtt& hay *..t tn
e
CS2353 OS]ECT OR'ENIEO ANAIYSIS
AND DESIGN
UNTT - N
7 Mapprnstffi.;3ldIl;;
obrect repr6!.t uons
u$ooe ur, Navrgaflon P.ths,
PrrFlld B,
\
CS2353 OB]IECT ORIEIUTED ANATYSiS AND DESIGN
9. What ;E th. .r!t rl. in ptanniry th. Ddt it r.tion dlring .t.bohdon
shos an abstrartbn of sle c.n@ptoat ctass* 6nd shows hou they retate to edr
t.-\
CS2353 OE'ECI ORIENTEO AiIALYSIS
ANO OESICN
U TT.IT
12. Ae.romEt. Erd D.t xd.t,
arc flE *h.
thtDs?
a donah model rr nor a dah Borr.t (whidr
by defintton
!0*ofrmc,!dd..drGE- Rbbt,td$,r;WnaG
Dd16",o@
PEp@!d-t
CS2353 OS]ECI ORIENIED ANAIYSTS AIID OESICN
ph$ird or tnllue.h,{t
(oi6ir,npe d rmr&pq
C52353 OB]ECT ORIENIEO ANALYSIS
AND
LD",.dE
CS2353 OUECT ORIENTED ANATYSI. AND DESIGN
17. Explaln pith an d.mpl., th. nethod ol ttrdtng .nd ddwins .onepuat
Frcfi the oteqory list ard known phE* an.tysts, a tsr ts qenerated of andrdate
@n@ptu6lclases for the domarn. fie rist is @nst atned to the requtEmenrs and a
slmolified veGron as for rrafld.-1
As an .hopl. th. foll hg .E idendnd ll4 o, .on..ptral da.s lor
t 4l!1.,l
@)
t;;tu;-----1
7.*,y4 ttu*;*;.1
FiguE - htiat POS Domain Modet
la. wh.t .E D.*rtpuon .t.@? civ d.hpt...
xampl, a P.odu.t o&nptlon dl.t le.ds tne prke, ptcture, :nd rext desotprons
of an rtem. T} is was flut nahd the rlsh-D$.tipt* patto.n.
rte n6d f6r d@rtpUon ct.5*
. an rtem rctance rp@nts a physrct trm tn a stoc; it hay have a senat
. an item has dscnptbn, prte/ a.d iremrD
. A Podud Dsrlption das re.ords Jnromation about irms
. Even I an inventorred trems are sotd and orcspondtng nem soriw.e
lnsbn@sare dereted, rhe Prcd ud Descdpr dn sril reiains.
CS2353 OBJECT ORIENTED AIIALYSIS AND
I is ptrysierry or rosEiiyGiEiiEi
Prcdu.oescnption rrii
CS23*I OSJECT ORIENTED AIIA
/loqqed/rorded/cported/@ptuEd
Re* atlon fllohtmanrfst
Player - monnop.lycame
A is an organlzatlonal Subunlt of B
Sal6unerten - sal6uneltem
13. D.nn..n .tt tbur6. Exptatn whn.n ..nDl. Eins uxt rotatio.
An atrribute is a l.ltcat data
2s. lln d6.tn mod.t t. rurther r.frEd afrer tho liBt n6Uon?
CSA3$ OAIECT OFJENIEO ANA UNIT -;IT
:r )6'q(a-^)
('"''- \_ _// \--
24. wh.t l. suh.l.rr c.nrom.m.2
CS2353 OBJECT ORIENTD ANATYSIS AI{D 5ES'GN UNTT - II
.Eod.xft
2)
30. wlr* rE th..trene rDtlv.tl6n. to p.rdfl@. @nelrsrt ctr.r whrr
Ihe forrowhg Bre tne st6ns morMnons to pafttuon . da$ toto subda$esl
Crete a @neptuar subclass of a slperctass uh6 |
. Ihe subcta* hB .ddnbnat abbutE 0f nteEr,
. n'e *bda* has adda{o.at as*htions of lnteBr
! The subclass @ncept G operated onr handtd, @ded-to, or mantput.t d
{perd* or othe. eubclasss
drfieendy than the
3r.Gtu .Fmpr.. ol mtlhrlon. to p.rd n . coneptuit ata$ ,nto
13
CS23$ OAJECT ORIENTEO ANA
cE e a supElass in.
sneraliauon retattonship ro subda$6whenl
. Ine potntlal conceptual sub.tass* repreent vanations of a stmttar @nepr.
. The subclassB wrll 6nfim to the 100% and rs-a ruts.
r All sub.rass* have the $me arribute that @n b radored ou
l*,-*_ll--- -l
Assume rhat every PayDert inst.n. frust moe spedfic[y be an hstanc of the
subda$ neditP.yndt cashPayneht, 6 checkkynent, sJrce erery palrerr
PEpdd Bt
J CS2353 OBJECT OF.IENTEO ANALY
16
CS2353 OEIKI OfuENItD ANALYSIS AND
UNrl.II
r-_,1r -_ -f * t
IEFEd Bt
CS23$ OAIECT OfuENTED ANA
omDGiti6:
Comp6ite aqqEqauon, or.omp6idon, means that the part is a nehber of onty
ore mmpGite oblec! and rhar there is an exrsrene and disposition dependency of
th part on the composire, F.rekmpte, a hand ts h a composition retaionshrp roa
> OpeEtlons su.h as opy and delete - appled b the whote often propaqate
b) Mutripltdiy
A rcle n.me dentifs an end or an assodadon :nd td@[y denb6 the Bt
playd by oblects tn th. as*i.flon
46,Wh.t aE ih. 6utdti.@ told.d tn part iontn, tre domln tfod.t tnto
Uritl a.lvity drasEm shown abNe \t\sjr.. aclJa., patu ohi &, jotn and
> h e*ne thE diasram shoE a *quence of .ctjons, some of which may
De p.rarrer.
>
on@an.cton is fntshed, rheeisan auromafl. outsotnq rEnsition.
>
The dE96n en show boEr conkol flow and dat. n@.
s0. what ir a aEin.r. obj..t ltod.t?
'rhe up Domatn M.det ts a sp*tatizauon of rhe
up Bu.hess obret Modt
(BOM)'rocushg on qpta,n,no,rhhgs aid producls
inpotu.r to a busi.ss domahi
[RUP]. That ls, a Domatn t4ode rocus6 on one domatn, such as pos
retated u\hgs.
The more b@ad Boi4 ts an qpanded, often very targe ano
dimcuft to aeare, muth-
dohain modet that cdeB the efirre busrness and allrs sub
domatns.
51. Wftar .rc th guid.lne. fol*rd h ..ti-urty hodo[ng?
An acUvity dlagram may have the rolcwinq etenents:
o""u'
uxn -
L-
JIIio.., oo'n'"o ou*"t o*o
)*'::\::::---- d.u.'n oe
-ffi d.r.p
perf'flane or I o*"-'
t'r E9r4nt tne
5t
^ctltilv
lil*I****',,,t*Tiid'["Jffi [*,r..t#"J:
thatndoesmtEqucanqptr*"1:::..:";;"*""".
:r:*: [,T"f :1T:l]:;:,"v"::J;:::: :,:il;:::";:
flfl T:"[[T:i:i::i "*;::',:*
;; ;""'ll "'::""r:u:l
:#;ITJ:: tlt-"T.,".,'.'i"i1 .*.".",,..."
;"
o', o"'"""
" :l:T|"ffi :I""i"x; *-'"*'" *' *"** "
*'dm{d!!!!lg1
,z*
"*-i*1 _
a Ptrr net @nsists of p/a@r rrarslr,brs, and d,i.aed a6. Ac (n ltom a plae
to a tBnsltlon or vie vee, nder between phes or bet{ed t6nsliions. The plaes
from whldr an arc runs to a Eansttron arc 6tted Ur irpur p/a@s ot the transldoni
the plac to whl.h aE ru. frlm a tEnslflon aE elled tne ourplf p/a@s of the
Rep@nt *nff may Inrtrally b onsidered a number or st|tng as a new dE!. rype
class rn the dodaln model if:
r it is compo*d of seradte se.{ons.
r o
Phone numbr, name ofpeEon
ltee are operatlois sssocratd rith ir, such as paEtnq or valrdaUon
o S6ia I secu rlty num ber
L
CS23$ OA'ETORIEIIIEO ANALYSIS AXD DESIGN
. srrhs (rdt)
CS23B OA'ECT ORIENTAD ANA
60. For th. *tr.ma .nploy.. (.mp-t4 6p-nam., sr,..t, .tty) stE tn..h..
rcpG.nt.don .lons with dE :nnbut. tyae. Ir{d/Dec 2oo9l
Cily: Slrirg
TART.B
1. Dl&B rn d.t ia .bour Etnt rdon. S-t.t th. tG, t.r.s .'d D.lt pr.cre.
Ed tn Et.64!ds. sLr. di. Ardth.t ttr eta6G6don
r Get the Gedback ,t-om !*6 and d*toDEE and test the sysrs,
. Dddop most ot lhe use 6*s tn deE[.
adlt t'trEt boEtiln
Samrte ArtiFacts rhar are u*d in etaborairo. srage are:
2. What doh.in mod.r? Con.id... ban*ins sy.r.r an whlcn. bsnk h.. one
13
or m.rc br.n.he.. E.h bran.h has cu.roner wtt.h a.6unr 13 pEsr tn th.t
bran.h. Th...@unt G.6 b of rwo typc. evi@s a.@uDr and Gurrcnt.G@unt
! usins tne UML modelns the dom:tn modet @n b. Epre*nted usinq a .tas.
E=
E
CS2353 OB'ECT ORIEMED
AIIALYSIS AND DESIGN
uNrr -d
L1 Dffai, lt.d.t.r , virGt Dtctioniry,
roomdtn modet snom the absEdton
or the conepu.r ctas*s,
odd en b. qpre$e; h pEmtexr..
i Blr th @n@pt@t d.s6
d thrr ctaoonshtp unh other
Gxpr.s$d usho vlsat tanguage
.tass* cn be
unng a domah moder.
. Hqe domah hodet ts ElbEGd as visuat dtflonatu
2.2 DoD.ir rodet End s.nlrrarc
Bo.In@ obi.ct!!
i D-dd, modet ts a vEuatEatlon of fat Mrrd enoH* and not the repEsentation
or$ftEre bustnes obr.ds.
. Foll4tno tements ae not suttabE
h domarn mdd.L
6 softw.E anifacts strdr as dar.ba* o fite
o Fesponstb flg or methods or tuncflons
2.3 crkrdth.
oqr. a Don.tn nr.rrd
ro
Find chs*
aE @n@pruat
Dtu tnem as dss6 in . ul{! d4 drasBm
add ass4laton and annbutes.
L"p.d B,
CS2,353 OBIECTORIEXIED AIVALYSiS OESIGN
^ND
iE_
Orho.dbboEtlhE.y.r.r. cEdnAlthorradonsystem
. The tuIy drs.d u* @ses are an excenent descriDtron to d6w rrom ro. tnB
analys,s. For q.frple, the curenr *na o of the P,@$ sa/e use @e cn be
For example,,{ou, Dhr..6 are ldentfld (showr ln hold) fom PEe. Sal.
u* .. as perthe textdescnpuon below I
EErpL: Mdhod of 6ndi4 rrd dnlirg .otre!'lur .h& (Cu Sh,ry- prOS Domltr)
F@ th. qt goo tin od knM pbE. ardysir. a tist ie g@dEd ofandid.G
tupnd class tor 6. dmiin n - .*it ,r,. r.rb*i,'g * ia.,,itj tin .i
@Gptul .l&s for pres S.t. @io:
f re",--t
tr-tl @_l
@j GA-l
Lte- I
3l
CS23$ OA]ECT ORIENTED ANA
. an Itefr lnstan@ replents a physlGl ltem h a storc; as such, lt day den hac
. an Item h- a descdDdon, ori@, aid item ID, whrch are not.srded anwhere
;=G
r A pa*icula. Itm may have a serlal number; ll Eprents a physlel lnst ne.
. A Prcduct D6cnpion wouldn't hare a *rlal number,
cs23s3 oBJECT ORTENTED ANALYSIS ANqDESiGN
rLEEEtr
l. rlnd out the onftptual cla*es ushs the above denaed thrce srEtegtes
2. DEw the UML cta$ dtagEm ror rh6e dasses
3. asdauoN and atuibures ro the* ctassB
'dd clasrs can be tdentmed ustng the 6t g6ry ta'i. Some @mmont u*d
Conceptual
6tesorr6 aF ds shown in the folorhg rdbtc
h..ductcar.,o9,E okGtarog
P.*n9er,Accountanlstudenr,cusromeiubEdan,AdmtitsEator
Darlysdtedule,Repar6ch.dur
oataba*,Rcglsrer/Ledser
7'
cs23s3 ouEcr oRiExrEo ANALYST5 AND DESTGN
treblm Dq.rtptdr coEtde. a. aTM systm tn whhh the .M6r wth .. 441!ljrl
6n estahlrsh saston with the systh. FlBt or.[ he tHn the crd lnto t E sysren and
ent* the PlN. The .onsote or the sysrem @ds the 6rd and authenner6 the
dst ner, Ine system has consote @nralntnq dtsptay.nd keyboard.
l- c..*r.-l
rt
F-----
tr**.;l
rl
E ---
. It's usetutto find and shos ass@bnonsthat are n*de<t to satsfy the lnfomadon
requrEmenrt or Ehe current scenaros under devetopme.r, and whrch ald ln
unde6tandlnq the dom.tn.
ts-
L
"jf; I
Iq.-r!!.-\
The .nds of an asdation may @nratn a multipltctry qpressron
indi@ung ore
nuned@l r.latlonshrp betvreen insran@ of dE da$x
cs2353 OBTECI ORIEN:IED ANALTSIS ANO DESTGN
r lle ass.datton ts tnheEndy btdtE tbn;t, meanhg that Foh tnstanes of etther
class, togtcat trnveel ro ihe other 6 pBibte,
. ftts tEverer E puretv absiract; it E noL d staremenr about @1necfloG b.tu*n
$,tware entitle<.
. An opton.t 'readtnq dtE.flon ams, i.dtcte, th. dir..flon ro red tne
asdatlo. namei tt do6 not tndtore dirstion of vtstDt[ty or navlsauon,
. If rle amw is nor pBenr/ the 6nvennon G ro re.d $e assoctadon fEm telr to
rlght o. top to bottoo, atthough the uMt dos nor make thts a rute,
Hd to N.D. an A.ro.ia!_o, th UM!?
L,-,ftame an ass@iatlon ha*d on a className-VerbphEe-ctcName fomar wheE
th*elb ph6* cre.Es *quenre o.r E Eadabre and meningrut,
a
.r,-s,nbb nams such as,,Has" or,,rJ*s, are usu.lv p.s, ae rhey
"*d,h-
seldom enhane our unqeEbndrng of th domah.
r@ @mmon and qua[y teoat fom6ts for a mp.und asocianon name arc:
. R@ds cumnt
. navtsab ry
Iub_Dldy on an !E qirir.
F.r example, a slnsle hsran@ of a store en be asdared wtth ,manyi (z.o or moE,
indlaiqt by the *) Item lrerancs.
some eemp6 of Dutdplcity expErois aE shown h FlsuE
t
CS2353 OfuECT ORIENITD ANALYSIS AND OESIGI!
dD6BrtrrEbrdb@rr@ruErstua!.E!6s(MEMd6L!dtu,di;r4'
lrultre asso.itd,onr,
ftemsal6theltem (q SatO
a ls knoun/lo99ed/rsrded/Epored/captuEd tn B
R64atorFllghd,{anliest
E*
rbunenemsaresu.enem I
Xuaresquael
cih/oty I
*-
CS23B OA]ECT OPIEXIEO ANALYSIS AND DESIGN
A5$.l.rior R.t.[on.hip
tho)
+a@.]b@
+@tu + rlrt,
,-1
h th. relaflonship berueen the.ustomer and rhe bank
above nq
the aEqr.tton re,ationshtp. This @n he rad as loe cutum.r
4_ Alt6dsa
5, A tsus/rerums B
5. @Dmunlcte. ,ith a
7. A^ rs fo0owd by s
3. A js owned by s
Hw to n d .*ei.don *iur
tulrowhg rabte shows drfierent
be ldeftned fom ue ommon
^ E iqeecny or pnyscaly
PrEesd B,
L.
CS2353 OB'ECT ORJENTED ANALYSIS AI{D DEsIGN
Cu.tonr nee& tO
A@unt has a@unr type
Fllght has Dar./Tth.
Stldent has h.me addrd.
'nd
REPRESEI{TATIOX OF ATTRIAUIES
Ine attrrbltes aE in the *cond dmprrment of the ctass- rne data rype en be sn;wn
i.-- -- - - I"r+"L*" 4
Llgil L.-<-- ! -
49
CS2353 OBJECT ORIEIIED ANATYSTS AI1D DESIGN
UNII - N
i For empte, i
physlcat paper Monopoty game board L d*troyed,
tf urtnk of k
tne sqoares as betng d6rEyed as wel (. @neptuat peEpelve), lkewtse, tf
a
soltu.e Board obicr E d6rEyed, lts $ttw.E Squae obrers ae destroyed, h
a DCO $ftrare p.Bpecflve.
Hd to ld.Eriry com@t 6n
h $me @s6, the peseie ot composttio. ts obvtous usuary i. fiFtor assehbties.
\
CS2353 OB]ECT ORIENIED ANATY5IS AND
DESIGN
. opeEuons skh as copy and delete appled to the whore often propaqare
to the
__- rf-'!du.. l
r..'Lp@rero i
t-
C52353 OB'ECT ORIEMIED AXALYSG AND DESI6N
I'su-*@;Lr
ldrB
tdstfyhg commonaltry
GeneElazatlon rs the actvtty of
denrhq supeEtas (qeneral @n@pr) and subda$
,.vn-\i
,*-
LE] rtr
!e1l J-,
,L.F,
D.flnrE c.r.Drrit slpeEt.*es
. s'ne h E varuabte to rdeitfy and $bctar4r
onQptuat suDe. an
;"1'**v
1'1'1 of.tass
**",J"" *"ffi,,i"ll'il"1.fijjT; lJi.i"J I
Etu definEon and ctass s.ts
'
:..:"*"':' o, en@mpa$ine *a. a
. For *mptq consider rhe supercte paymenr and ibi subda$'s
(casnPaynent,
and tu o,).
.:"T.*dennn|onofPdYmeE$.ttrep@nts
r..nsfemng money tr* ,"_*rn,,
_.nt
*,.*"i*:;;,;lJj"#;"*.
", " ",
_" ** .
1r","",, ""0 """ ro thrs E
! The fiodt @respondrns
shown h fique.
P6rn. de hL6ftny
r A credrtPdvment 6 a tEnsfe
nsdtubon whkn neeits ro be
a
CS2353 OBIECI ORIENITD ANAIYSIS AXD DESIGN UNTT - U
--,t',d----.--.
IL
Ed Pinr
i I
' All Payne.t subclass hust @nfom to h.vinq an amount and @vrno for a sale.
. h 9n61, thls rule ol onfoman@ ro: supercla$ deflnltion ls the 100% Rule:
100% of the conepru.t s! t rcta$'s defin ihon shoutd be a ppl@bte to the subc]ass,
Ine subdass nust confom to 100% ofthe superdass,s:
.attdbutes
. a$ociauons
Coneptu.r subct.$ acr Con oh.ne
. a cone?tual subdass shoutd be a mnber of th ser of the superctass.
. Thur e.ditPatmnr should b. d member ofthe set of payments.
. Infomally, ttris expBes the nolbn thar the @neptuat subcla$ t5: khd oa
surer.lass. creditPaymenr rs a kind of payment.
' InE K.d of onfomane is the rs-a Rute:
CS2353 OBJECT ORIEMIED ANALYSIS AND DESIGN
lq Rut.
. Arl the @mbeE ot a subctass set must be members of
r h natud bnquaqe, this on usoaly be tnfomalythetr superctas set.
rstd by fominq the
sr.tmenu subda$ is a supercta$,
P,.p6,.dBt
CS2353 OUECI ONEI{TED AAIALYSIS AND DESIGN
Ba*d o. the above cdteaa, It is not compellinq to partition cusromer inb rhe
suhd.$4 Malecufther and Fedslecustoner belse they have no addtUonat
atklbot6 o. asociauons, aE not operated on (treated) ditrEndy, and do nor
behave dtffeentry in ways tnar aE of litaEt
Guld.lln.
cEate. $prctss h a geneE[zarid Etationshtp to
subdass when:
1. Tie potentiat oncepnral sub.hss6 rep@nt vanatons
or a shitar on@pr.
2, Ihe subda$6 wilt conrom ro the 1oO% and rs_a
rut*.
3. Arl subcta$* h e the satu attnbLre rhat can
be erdored oot 6nd expcsed h
,1. A'l subctassB have the
sam asso, iaron thar .dn b llctored out a^d Er.red
ro
,(o --"''h,-._
,t",*,...-,
-
'=2)
**)
Pr"ra,ed Br,
CS23S3 OBIECT OR]ENIED ANALYSIS AITD DESIGN UNTT. U
:,*,".*- 1
r!"'t" l
I hdd.dbt16,6
I
a
1il.*4...tdt.e6r5 .tr .r d-
IrE 6hE domin EqlnlEnts * trE saage 6. asd*jd das*:
. *ryiG dgn . mddEnt !D ro edr stor for idendfltion
^lnhdEaioi
dunrq @nmunkaddu.
.
pyftm aullEiarrotr r.qu6t fion the stoe to an aurh
A
ecds tn. meEhanr ID dEt idenflfhs the *oE b tne sedice.
r FurdEme, a srore has a dttrerenr meh.nt rD for each *Nte,
Edng mehanUD h store ts tn@re.t b@use a store can h.ve moE rhan one vatue
for m.EnanuD. rhe same is true wi$ ptactno ir in Authortzatoiservie.
lnapDmoriate us o, an dnribute.
ig-e49 i
CS2353 OB]ECT ORIENTEO ANILYSI5 AND DESIGN
An asso.iarion das.
f,e;;;I;;-l
tllirY I
,_:1)
) -l
.)-.*-
G5;
trow to apply acdvtty Dtasr:n.?
. A UML adtvtty dlagram offeB rtch notauon ro show a seq
in.llding paralet actMfl es.
. It may be apptied to any peBpective or purpE, but ts poputar ror vislalzhg
budnB workltoE and prces, and use eses.
Bu.lhe prec. M6d.titr9
one of my crlents rs tn the expre$ pa@tshtpphg bustn4,
lie pr.ess or shipptng a paEt ts very nontrlviati tierc ac many parrE
involvd and many sreps,
Althoush thrs prcess 6n be epturd in rexr, in rhis 6e aclvtty dtagrams.e a
sHt exampJe of piclures betng wonh a thousand words.