Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Uni 2 NoRestriction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

CS2353 O$ECT ORIENTED AXALYSIS

AND DESIGN

MAILAM E{GINEER!I{G CO!I.EGE


riartara (po) vifl{plh (Dt). Frn! 5o4 3o4
(Appbv.d ly ArcrE l{.w D.thr, Artr,iated
to Anh. Untu 6,ty ch.nmi
t a.cEdlt d by N.Uonat E@.d oa a..r.ditad.n
ctBA) lrw D.thi)

DEPAR IENT OF II{FOf,IIAfiON AND


TECT OLOGY

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

li ot\e. words, EtaDoEflon rs the rnnial senes or


tteranore
. The 68, ristq $ftware archrectue ts pbq.ammeddurtIg which
and resled
. The majonty or requkmnts are
dts@veEd and stabflized
r The major risks aE mJtigated or
redu@d

aurb rhe @E archiretucj resotve rhe hEh rtsk


etementsr Ddin m.sr
Requirements, ind Esflmare th @eEI
schedute and Eource
3, D.th. tb. trEt tt .adon 13 ehb.rr on ph....
Iteraiion-l of Etaboratbn phase emphaslzes
rund.mentat and cofimon OoAr'O
skitJs used in buitdhg oosystems.

The rqurements ror th rirsr tteB on orthe Nqr6en pos appticaUon


. Implement a basic, key scena o of rh
rr@6 sale us Gs.:
and receivtno a castr pyment.
r Implement a sf,n up use Gse s n@ssary to supp.rt
n*dsofrhe irerauon,
. Ndhtng fancy or cohpler G handred,just
a stmpte happy path @nano, and
the destgn and imptementanon to support
it,
PDoEd-,4
CS2353 OBIECT OfuENTED ANALYSIS
AND DESIGN

. ftere ls no @ltab.Btion wth erernat serylces, such as a tax clcut*or or

. Noomptex pnchg rutes a.e apptied,


r The d6lqn and imptehenration ofthe supporting
uI, d.tabase, aE done (xot

.
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)

Tchnicat prcof or-Concept, use. rnrerfa@


odented Prototyp6
De.islon on.omponents: ro buy/build/Eu* t k n (Eq, ro buv rax Gtcutauon

. 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

7 Visualtzation or Donaii on.eDts


/ Ser ot D'asEme desdrbtns the
losi@l D*ign(software ctass
Dlngams, object Interadroi
Drag6hs, and Package Dtagrans)

r' Key ArchiteduGt rssues & then


Resorution in summa.y rolm
r' summary oroutstandins Destqn

e
CS2353 OS]ECT OR'ENIEO ANAIYSIS
AND DESIGN
UNTT - N

7 Mapprnstffi.;3ldIl;;
obrect repr6!.t uons
u$ooe ur, Navrgaflon P.ths,

A domain titodet ls rhe


mGr lmporr.nt and ctassrc moder tn oo
Anatysis.
o
Il lludr.es noremrrhy c.neEE m d Doma,n.
o
s@@ of rnsptrdion ror dctqntng eme $fr*aE
obreds (whi.h
bome hputs ro severat aEhcts)
l. GrE an empb or dom.tn nod.t ytth
UrlL de Dt grh not tbn.

l{s!E: h,tinE;;rn-nodr:-i r.Mr Diamary


E-'ltdd
Domaln Modet drawn wlsl Ultt de dragram noration:
con@ptual class or paynent
a.d sate arc srghificnr tn this doharn.
A payhent ts rerared ro sale whid
ts meantnqtutto nore.
The Sak has dat rnd flme (Att
iburs we cE about)

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

taaoE su.h as uncrtalnty of effoft or

Major parts of the system are at least


touded on eany ikEtions
Funrtions ulat cxent @nsider orhiqh bus'ne$ varue
6ll a dom.ln modet a vt$.t dt.nohary?
domajn modet Is a viratdtclonary or
. the noteworthy abstractions
. d.maii voabularv,and

shos an abstrartbn of sle c.n@ptoat ctass* 6nd shows hou they retate to edr

11. what aE oneptuat d.se?


Informalry, a @n@ptual .la$ is an idea, thtng, or obled. More fomaly, .
oneptual.ra$ may be c.nsidered in tems of trs symbot, tnteEton, and extenston
r sYm60t-words or rmages rerrBenting a @nceprlat cr.$.
. InteBio-the d.finttion ofa coneptuatcta.s.
. E)den.io rhe *t df examptes ro whtch tne @neptraa ctass aDples.
For .rnpl.: consider rhe @ncepruat .t.ss ror the event of a purchas
vanection, choose rymb.t ae sri.. The int6n.ton of a srre may siate thar tr
'Eprents the event or a purchase tEnsaction, and has a date and gme.. Ine
.xt6n.lon ofsa/e ts a[ the examptes ofsat6; tn orher wotds, uE *r otal sates,

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

13. H4a dom.t, horr.t


ts @i.d?
steps tnvotred in @adng a dohatn
nodet :
r Find the @neptuat ila*s
! D6u tnm asdas*ina uMLchsdt6!6n
Add asqiaflons and arfrbures
'
14. Wh.t aE irre tfi@ .kat st. to litrd @rc.p!l.t da&@?
a) Aeuse ornodr, *isrhs modets (Frut, Best, and .ast4t
arc publshed, wel @ned domain
modets aM dara
such * tnvenrory, finane, hetth,

b) use a c.cqory risr


.) tdendfy nou. phlaE_
ls. ur.t b co@Dar.I ct& c.r.eory urt?
we @n klct srart rhe @auon of a
domatn modr by makjnq a tht of ondidat
oncptuat cta*s. Ille folo nq tabte
onratns many conmon @reqodes (Bhtch
aE

!0*ofrmc,!dd..drGE- Rbbt,td$,r;WnaG

Dd16",o@

T.UL lo.t c@tPnd CIB C&tory tun

PEp@!d-t
CS2353 OS]ECI ORIENIED ANAIYSTS AIID OESICN

CooeplDd ek$ Calegoly

ph$ird or tnllue.h,{t

Sdfrlttu, de5s6, c d.idAd6

olts MpoErd ekt rE!&irl CdrP.Noikiqndrorgat


&Wbc!{l/'ol

(oi6ir,npe d rmr&pq
C52353 OB]ECT ORIENIEO ANALYSIS
AND

* metrod .. nndhc @nel'tsr .r.s.B !.hs


-Yll I Noun phr...
@n phEe tdqiiletlo, ts another usetu
..
ttrgutrd. .nEtFt.,
tennqu wht h rs based on
t rt ts based on tdentifyhg rhe n.un, and
noun phra36 tn txtual
d6cdpnoDs ot a domatn, whtch en be @nsldecd as BndEate Gonc.ptu.t
cta.. or .ttdtut..
. Ihe tuDy dress.{, usecas* arc an exeltent d*nplon to d6w
analysts, For e&hp, rhe .uftnr knarb of Ule pl46 s,/.

x6un phE.6 aE idenilld (shown rn botd) frcm Pre sat.


U$ e.. as pe. th. reri de*rrdion
sE6. se;j;;J;i.ric H- t
c!.tomr 6fir at a Pos ctckour s6d. .ndlor ..rie. ro

c$h|.. srarts a n4 st..


Crhlc enreE ttdn id.rtitq.
sYsten E@.ds qt. [m it n .nd pGens ith
detpron,
tunnhg tot l.
Pde ehutared nom . ser of ort@ niE
C.shrs Epe.ts steBt 2-3 ! il indk
tes do..
sFtem pl!@ts torat wtth tahs @tcut.red,
Gshjer tels Cosrom* $e totat, and
asks ror
ojnoner p.ys and system handlB palrnent
system ,.gs r,1e @mpteled et.
cnd *nds sate and paynerr ,niomahon
to
he qtErat a@unttrg (for .ounths and.onmt!.ioE)
sl.stems (ro upd.re tnventory),
hEnrory at
ro,system pr*nts E6tDi.
11. custoner b.v* wtth E@iptand
12, e(tensrons (or anemaBve Fres):

L C.shier entB the @sh .mou.rt tond.rcd-


z sysrem pE*nts tne b.t a duc and rets*s
the ca.h dr.w.i
dand retums batdnce,n.ash !o cusromer.
4, sy*eh E@rds rhecash p.ymenr.

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

19. What l, ass.lat6.? E atatn wirh an &mpt..


An a$ldaflon ts a Etationshrp betlv*, da*s (more
thse dasg) tnat Indhts ene hsninsfut and tnteEdng
20. E.pr.l. A.sodad6 q.tnq url D6radm.

a$eErbns are defrned as sema.flc retafionshrp berwen


dDt Inhtve connedbns amons rh.tr tnstanes

21, wrEt l. Eutirptictty?


how many tnsbn.es of ctass A en

FIgUE - Mutdpticity of6n Asdauon


m.thod ot fndins A-od.tion3 u.irg cohmn A.s.d.tio. urt.
a rs a tEnsacflon ctarea 10;;i;;
Gn@llatlon - R* aflon
A rs a ,rre nem of a t ana;a;iT
n s a prcautt or eervriiEii
tEnsacron B(or rne ltem)

a rs a rcte retated to a tE;*ai;;


a rs a physrer or toslGrElt-iE

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

r sale ne.ds a dareTlme aMbute


. store needs a nameandddlls

FleuE - cla$ and .tt ibuts


CS2353 OB'ECT ORIEI{IED AXATYSIS AND OESIGN

24. H4.trribut aE !s.d rn o6arn rao&r.? ErFt.tn


Slatgr. of Ddn.in Mod.r

2s. lln d6.tn mod.t t. rurther r.frEd afrer tho liBt n6Uon?
CSA3$ OAIECT OFJENIEO ANA UNIT -;IT

Genenlization and spcialEaao.s are fundahental oncept h domah


modeliig. concepEat class hie@rchis are oiten inspidtion for sofiwaE clas
hleErchl6 rh.L e&loib inhp,ibnie.nd,edu(e dup'ierlon or ode,
padag6 ae a way to organize larle donain oodels hto smaller units,
Domaro model is turther Efnd ulth Gene6lrzairon, sp4ialization,
Asdation dasE l'ine lnteNals, conposltion and packaqes, usge of

26, Wh.t lE d.a HioErchiG with an 6Empl.

. rde.nfy slpercia$es and subde* when they help !s under.tand @ncpts


in mo.e geneEl, abstEd iems and r.due Epeared rnfomadon,
. E pand cla$ hierarchy El4:nt to the curent rtfdtron and shou them in the
Domain Modet.
27. How coneptu.l rubd.s .rd 5up4 cl.l.@ .E Elat d in t.E. or .d
n.mbeEhlD? DrEw it !.ing v.nn di.s..m.
Coneptual subdas and superdas*s ae elated htems of *t membeEhip,
By dennDon, all membE of a @n@ptual sobda$ *t aE membeB of their
supercla$ set. For qample, antertu of sd membeEhrp, .ll instancs of the set
GeditPayrcrt are arso nembers of the set PaymerL ftas i5 s
draqram shown below,

: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

when a crass hre6r.ny E @ated, ltEtements ahour supeEta$ uat appry to


subd.*s arc mde. For examp,e, tne foltowtng nq. srEtes uEt a[ payn . have
an ,,i@rt a.d a 6sso.i.t d wrth a sL

torh to havhg an amoht and payins for a


Sale.
29. wh.t b 10o R.l.? o. wl|li t. tft6 rut. ot cont6m,n.. to Sup.Et.s

100% of the oneptEl superdasst dennHon shortd be applcable ro the


subcla$. Tne subclas musr contom to loo% of the supeEt*,s:

.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

colEPtq.l sub.la.. irotivation

The subda$ h.s addtio na I attrrbute Library - Book, Suhdass of


LoanablRe$urce, he an ISBN

The Subdass has additionat Payments - credlt Payment, subdas


ot Payhent, is asdated wrth cEdrt

13
CS23$ OAJECT ORIENTEO ANA

Library vldeo, subclas of


Loanabl.R*oure, rs assocrated with

Paynenb - credit Payment, sub.lass


The su bcrass @nepr 6red
rs o pe of payment, is handred differentv
upon, handrd, reacten to, or than other klnds of payments ln how
manlpulated ditrerentry than the
super class or other subclaes. h LibEry Software, subclass .f
L@nableResou@, requiB a deposlt

The sub.la$ @n@pt repEsents an


Paymnb - not appribre.

anhate thing(for *mpte, aitfiat,


mbd)rhat behaves ditferenUy than
Martt Res@rch - MaleHuman,
strb.lN or Human, behavs
$e suprcrass or other subctass6. rn
drffeEntrv than FwemareHuman tn
eEct to shoDDhq habrts.
32. How. Con.epb't sup.r ct..r
Ge.erallatlon lnto a ..mB.i supeda$ G mad when @mmonalrt rs r!itrfied
among potentlal srbcla$es.
33. whlt .rc th. ,uid. rin@ lottMd h d.tininq ! SuF. Cta..?

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

. a I subclasses have the same association that on be fadored o and tabd


f
CS2353 OBJECT ORIENIED AIT{IYSIS AND

34. with rn empb h{ . supeEl.s-.u!.t.s htEEhte .E d.fn.d .nd

l*,-*_ll--- -l

35. wh.t aE ai.t act coreph.I ct*sq?


If dery member or a class c must atso be a mnber or. subctars c ls G[ed a.
ab61E.r @E.pkrat .t.s,

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

member of a .ubclass, Pajl-err rs 3n abst6.i onc.prLal dass by

. D.linition: r every iistan@ of a clas c must


then C ls carred an absrdd coneDtuat dass.

. r a ,ayfrent lnslance exlsts which ls nor a member of a sub.tassr thn Payment


ls not abstcct - lt ls concrete.
Abtud.l*8.

35. What i. tll. hodefing of .h.nsinE

16
CS2353 OEIKI OfuENItD ANALYSIS AND
UNrl.II

Arsume thar a paymerr 6n etther be t. an unauulonzd or authorrzed


stare and
t rr meninstur to show rh6 rn tx

Do nor model the srares of a @nept X as ssb.tass6 of x_ R.ther, errer:

> Ignore showins lFe staB rn of a 61@pr


tl $e doma.n m6d.tj shtu rhe
stabs rn ihe surc dagrams,nsead.
3r. Defn. A.ei.tiond.ss wirh e.mpt.?

r-_,1r -_ -f * t

33. DGfire.) r,) conpoBitior


^gsrcsatioh

IEFEd Bt
CS23$ OAIECT OfuENTED ANA

asqregation rs a kind of aso.;atian ced ro modet whot-part Et.flonships


betwce. thrnss. fte rhote is ca ed ihe comp.srte. For tnstan@, physicat asmhf6
areoEanrzed ln aqgregatioi retaflonshiFs, such as a Hand:qqeoat* Fii.ts,

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

39. What .r. th. gltd.line for tdentityins .ompcltion?


A bmposrtron ,s also known as @mp6lre aggegatioi, is a stDng ktnd of
whole pad assreg.Ion and ls u*fut to show h eme modet..
a @mposition retaflonship impties rhar
1) an instan@ or tne paft (sdr as a sq@re) beronls ro onty one
.omposite instane (such a5. E@,rd) ar a tine,
2) The pad must atways b.tonq to a omposite, and
l) The .ompsire is r6ponsibte tor rhe dsuoh .nd deteflon of rts pa*s _
errrr by itsetf @dhnardetet ng tle paG, or bv mldborat]ng wrh
other objcrs, Retabd to rhts constainr is that tf $e mmpGib is
dstEyed, its pafts mun either be destrcyed, or att*hed to another
oTpdte - no nte flo.tins Fhgs.Iowed,

h Ule Pos donatn, the s.resunerrdrs may b @nsidered * p:rt of a composite


sarej h qe.eral, tE.saction the items aE vi*ed as parrs of an aqgregate
tEnsactron, In addEon to confomane to rhts patbm, thG ts a c@ty'detete
depe.deDry or the tiie trems on the sate - their lifeflme ts b.!nd within th tifetime

rigure - Arrrs.tto tn rh. Foitrt-.r-st. .ppti.ation

ao. wh.t.rc thc ben6fib or.howtns ConFd on?


CS*d3 OB]ECT ORIENTID ANALYSTS ANO DE'GN UMT-N
It
clarffies rhe domain eGtEtnts .gardhg ole eltgible qtsrence
of tne part
independent of rhe shote. h conpclre asgegauon, OE par
m.y .or qtst ourstd.
of the lrenfi ot rhe *hote,
> Dudng d6tgn wortc dris hs an hpa.t on the
@aeder.te dcpndenct6
between ttE whote and p.n sfrrare da*s and databa*
eremenb(jn r.ms
of referentlat lnteqijty and sodrno detere p.flLr)
> lr .onsists rn oD tdenflfcflon of a @ator (the 6mp.sire) ust.g rhe GRAsp

> OpeEtlons su.h as opy and delete - appled b the whote often propaqate

41. What .E A.3ci.do Ror. r{.ns?


Each nd of an a$odaflon ts a rote, whrch has v.dous prcpedtes, such as:

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

42. Whst i5 qu.ttfl.d A..od.don?


A qu.lt?er may be uredtn an assodaflon; it drsungurshes the *t of objeds at
the Far end of rhe assoctaton based on oE qualnr vatue. an
quElner B a quatiti.d ...odarjon.
Fot *nptet prc.letDejptjoE may be distingltshed h a prcducrcatatoo by
thelr rtehlD, as tustEred rn the ngure betow_
CS2353 OBJECT ORIENTED ANALYSIS AND DESiGN

> As conrEned h pfevious risuE (a) vs. (b), quatif@uon rEdoc6 oE


multiplcity at the tdr end r.om the quatifier, usHly down frcm hany ro

> Qualrfic do.ot


usua y add compe ng @tut rew tnfomation, and we
@n faD tnto the tEp of'd6tgn _ 6lrnr"_
> However, thyen sharten undeEtandrng :bout rhe domatn.
43. what i3 th. necd tor pa.k.g..? (Or) H4 rrc.h flodet is orsartz.d inro

> A doharn frodel 6n eas y g@ hlge enough rhat tt re deslrable to facror t


tnto packaqB of srbngty Etatd 6nep6
o As a.ard ro .omprchendon .nd pa6let analysrs wk rn whtct
dtrerent p6pte do domain aEtysts wtthtn dfiemr sub-domahs,
> Forrowinq l*.rbns tusiate E pa.kas. srructurc forthe Up Domain i,lodel I
o UML packaqe Notadon
o Owne6hiD and Rerrner
o P.ckaq D.pfnden.ts
44- Dr.w UML Dr.k ge wtn .n qnmpt.
C52353 OS]ECT OFIEirrED ANALYSIS AND OES1GN
UNII U

A Ur,fl. pactase rs shoun as tabbed fotder as


shtu! aDove.
nay be shown
withh it. The package i6m is wnhtn the Eb rf
d wldl.n the foder Be,r.
45. D.fie p..k !E D.p.nd.D.y.
If a modet etement ts t. some way dependet .n another,
lhe depndency nay be shown wirh a dependncy retarionshtp
'r Dept.ted wtlh Arrcwed une.
a pa.ftage d.re.dency tndrctes etenents of the
dependent packase know aboLt
or are .oupled to etehents h the ra.set packdae.
A P..kd!6 D.p.n.t6!Eyl

Ihe sai6 Dackase has a dependency on th core Etenents pac(aqe,

46,Wh.t aE ih. 6utdti.@ told.d tn part iontn, tre domln tfod.t tnto

Gurdetin* on OrganEhq cta$e ln Dom:r. Modet


Wjthin pack 96
To pattltbn the domain model into pac*ages, ptae etemnt toge$erth.t:
> ae in the *me subjed a@ _ ctGety re,ared by @ncept or puD@.
> are an. ctass hiraEhy togerher,
> participate tn rhe same use @ss,
, a re stEng ty ass@iated.

47. wh.t i. a @E p.Gk gE?


a c.E/Misc FE.kase E usefut to own stdety shared onepts or
those wtrhout :n
Cs2353 oB,+ oRIENTEo ANALYSIS ANo DESIGN

:ra. wh.t t. .n uitL adivity otrsEm?


A UML Adviry di.qmm shows sequenflatand paEletadtuiiB po.*,
an a They
are usefur for fr.dethg business prcchss! work noE,
data nows, and @mptd

49. What are the differenr notadons used h an adlvtty Dragam

Activity Diram - Figule 28.1


. P6tdnet mElin ,*
. Wh3! aE a.liore? T6d[q3?
E
. Ha dos ir suppon
D.E elim?

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 _

fi-:&6-raqad ror F-ebusii5. u* 6* hdNld@l

hodel of AlDod Ch*k'ln


=2353
OBJECT OfuENTED AND OESIGN UNII - [
^N^LB'S

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

53. What|r El.6o.arlon? t ay2un.2o121


. Elabo@don often conslsts or two o. moe lterations(2 to 6 weeks dlEuon)
. Each ltEtion is time-bded(1.e. End DaGfrxed)
Eabodon DsgnPFase(r,e. $emoderrs not tuny ddroped)
'snot
. also lt rs hot throw auay Prototypej Ethe. the @de an<, dsrgn .e pmductron

In other words, ElaboEflon ts the htiat series of iteBtions durhs whkh


. The @re, risky eftwar ardtu.turc is p@sEmmd and t6td
. Ihe ma&nty of requlrenents are diwered and srbirtzed
' fte malor risks a. mrtlsated or redocd
54- D.fin. aggrcr.iron .nd aoDpciuon? I aylrunE 20121 / [April/it.y 2orll

,sreqatron is a kind of assodadon osed ro modd shot.,6lt retationshtps


bet een thrngs. Ihe whole ts @lled the c.mpGtte. For instai@, physi@t assembties
are olganrzed h agsresauon relauonshtpr, slch 6s a Hand aoo..sat6 F1ige6.

composite asgreqatron, or omposibon, tnat rhe pat ts . member of onty


meE
one empclte obje.t, and that theE is ah qisten@ and dEpostflon dependen, of
tite p..t on t te @mpaEte. For rempte, a hand is in a @mpdno

55. What l. E D6E.ir r,tod.r? IADrtt/x.y 20111


A domah Moder is the most hporr.nr and ctassic
o lt allustrater .otelody Con@prs tn a
o sou@ ot InsprEtron tur dsiqninq soh efrwaE objeds (whr.h
b@me lnpots to *veral artfacts)
55.Gls th. hint to id.ndfy th. .ttsibuter of a ctas. tNov/D.. 2olr!

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

r It ha. orher attdburE


. o Pomouonat prte @dtd hav. a star (.fiecflE) date .nd end dare
It is a qu.nrty *th a untt
r o ,aym.nr am@nt has . untr or tuftncy
It Is an .bsEacdon ol one r moE ryp4 s,th $me of hese q@tfles,
o Item ldenanr In $e sates domah ts a qenc6t,anon of t}Tes such
a untveet pmdud @de (upc) and EuEpean artlcf'Numbr
(EAN)

57. D.trne swrm r.h6 tx@/r!..20111


swrm ran6 dlv{de adtviis a@rdt.g to obi*rs by afrnsinq obJ6rs ln otumn
form.t a.d placins acUvti6 by rhar.6J..t stthin that 6lumn. oble.ts ac tistd
at the top or the @lumn, and v.dEt baE separat the @tumns to tom ihe swim

53. Wh,rt aE tlF v.rt.u iyrE ot rsd.dd? I^prfl/m.y ,OrOI


ln asocration mllUptrdty defins hN many insr.rcs of . cta$ a @n be
edated wlth one tnstane of ctass B
vanous muhDldty value:
o zeE or more Le h.ny (denot d h|/ r)
o oneormoE (derored bY 1..i)
o one tdenctted w 1)
o Esctly 3 (denord by 3)
sg.Wnat .E rh. v.rt@ .ttribur typ..? IApnt/n.y 2o1ol
The attnbute ,n do@n modet sFoutd pEhrab.y m data typ6. very @mmol
r B@ten
i oate (or DaEnme)

. 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

61. D.trn. .gsEsldon. tNov/De 2ooal

Aqgreqatbn rs a kind of asciation used ro nodel srote-pirt ctationships


behveen ul'ms. The whole end the @hp6tre, For tnstane, physter a*mb[*
'5
E orqanlzed In agqresation relauonshtrs, su.h G a Hand .qqregar.s Fhg.6.
62. How . dG. 13 rcplqem.d in uill? It{d/De 2ooal
A Ul,lL das box u$d io tttr6tEte efrwaE ctassB often shows rhe
@npartments; the thrrd ilestrares th methods of the dass

s3.Dltr.r.rtlat .insl. mddpt. inh-tr.n.6.


and
A ddved das whi.n ba* ctas is 6 ed stnqte hherirdne fa denvcd
has one class
sh[ h hs moc than oie LD* ct.$ oan tt E cned muttDle rnhenrancE.
CS235I OB,,ECI ORIENTEO AMLYSIS AND OESTCN

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

Elaboraror @r be statEd as "B!ld ihe .@ arlrt4ture, resotve the htoh _tuk


elements, deflne most re{utremenrs ard esrm.te the ovml *t.".,"
. ,"."r;_,
ElaboEfloh ts a phase in whi$- "r"
r rne coG, rtsky son:ware.rchtt dure ts DrcqEmnd and bsbd.
! The majortty of fequfements .re dtsvered
and .tabfltzed.
. rhe major.tsks are refld.
. a&oEflon ts the tnktat *ns ot lteEuons dunng wlrch dre
rem does senous
hvesigaflon, imptehenrs (p6grams and r6ts) the core
aEr redurc, .tariates mGt
Equ'rements.nd tacktes EF nEh-nsk Jsues.

to b6 herwen ruo and srx wcet6.


. E dr neEtbn Is h.b4d mnhg tts end date E n ed,
r Elabo6tlon ts n.ftrrer a d6Jqn step nor a phase tn whtdr
a rulty deretoped nodet for
lmplementaton ts DreEred.
r sifrllad, tnE ph4 a tnw.*.y mod6t ,s not devetopd.
'n
. h thls phe, 6l*rEht .rdlitctrE or the .rcrlit .rrE h..r{ino of rie
rGy idq. DE.dE u.d In Etahodronl
and bst
some iey td6s and besr pricric thrr .E lsed
tn EtaboEfion phel
! E cn dsk-rrnwn ireraoon m6t be floe-boxed.
i Ihe @n and nskr parts of the Er.natErurc husr be dstqned
srep by step

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:

Ite domain nodet ts prep.red for modethg the


It
domah conepts. Is a .r.U.

fte aE BE cotr&fion ot dtagrams uEr reprc*nts that EE


rogr@t d6tgn. The desrgn
nEdel corclsts of ctass dtaq6h, objed diagEm,
InreEction dtaqBm and package
CS2353 OBIECT ORIENIED ANATYSG AflD DESTGII

sofr earc aEiit.hrE Dcument:


fte key arditectural tssus are & ecred h this do@me.r

c.Blst of database sdemas, objed and non oble.r repcentauons,


It
Usr ht rfd@ prototylEs:
It onsrsts or dEdtpflon of user tnrefaes and navtgaion pathr.

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

Domain model ls a visual repEse.,tar:on of conertuat da$6 or reat.ttuaUon ohlecrs tn


a dom.ln, Ihe domain models aE al$ @tted as deprwt ood.t., domtn obr.ci
mod.l. or.nnly.lE 6bj..t trFd.t..
r ,@dinq to unifid plc tie domain modet ls a parr or bustnss modethg,
. Hen@ d.marn modl ls also eled .s bufiE oblet nod.l
-. The domah modl focuses on qptairtng 6e 6 6ings and pEducrs of rhe

! usins tne UML modelns the dom:tn modet @n b. Epre*nted usinq a .tas.

. sut in rh6e ctass dtagrams d1c Is no ole6ton th.t t5 defind.


r lhls dE dohatn modl Eplenrs,
o Domarn obl.ts or con@ptuar cta$s
o Assocration or retationshtp brween th. @n@rtual dase
o Andbut* of .oneptual .las6.

Donrin mod.r ot Srrtdna sy'ttm

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.

t lUi.r t. 4Eprud de? E Dtatn t rttn th. h.tp ot Iturr..dvc .Empt


ca4m[ld.B .
coneprrat d.$ rs . thlng wltch 6n be dpEssed ln tems or symboq lntenron

rne lmgs or rh @rds thrt .e repBennng the oneDhEt rtases.

ro the dennNon of a @neDuat


.las
the set or qands ro uhtrh rhe oneptut
_ ctass ippi6.
' corerder rhe @n.pt!d .ta$
as B6k The rnreBton of Dook
nay De issutng and
Etumtng of book h.vtnq rsBN,
TTIIE, tssue-Date and pturn Date,
r .rhe
exEnston of rxis ctass b the tbrary
managenenr slsteh

L"p.d B,
CS2,353 OBIECTORIEXIED AIVALYSiS OESIGN
^ND

3.T GUIDEUNE TO FT D CONCEPTUAL CT^SSES


Th@ S:rategies to frnd conceptuat ctassG
. Me$od 1: Reu* or modify extsttna modets,
. Meorod 2: U* a @tegory [st
. phE*s
Menrod 3r rde.dfy noun
i,r.th.d 1r R.c6 didins hod.t3
Reuslng exrsthg fiodels is *e[enr, but ouEide ou. scope, the semnd dthod, usinq a
ategory rist, G also usetut.
M.tn d 2: U$ I ..teaorv ttrr
. ceie conertuat cla*s,
a domarn body by maktng a tisr of @ndtdate
lhe below table sh@ many 6mmon etesortcs for blshess tnfoma on s'tem
Exanpl6 aE dEwn from ine 1) Pos 2) Monopoty 3) Airtine Eeruaflon domarE
C.n6rtr.r ct... 6t lory ri*
Coneptr.l de et lorv

curdellne: Th*are otHet (they Involve


money), so staft uth hca.rlons.

Guldellner T6nsac{ons often come wlUr


rehted line ltems, so @nsider $ae .i
i.!do.i or .di@ Et.t d to a
tEn...tio. or tEn..ctlo lln. it m
Gu idelhe: Tra ne.lrons a ror someth hg (a

wherc i5 tlt6 tEne.uon @rded?


CS235I OBJECT ORIENTED ANALYSIS AND DESIGN

RdB d p.opl. d org.nlEuo. rd.td C6hrer, customer, At.Ine


to th. Fa.scl.n. .ct B l. lh. u*

Glidelin.: w us6lly .*d to kn abou!


the partr lnwlwd rn a tEnsacuon
tle ot t!.anE.tlon i tL.. ot .srrt@

rlotdtthy 4nt , olta wlth . dn. .r


Pl.em ned t Em.nbr
lny3laB olre.t
Guldelhe : Tnb E espedatty relevanr shen
cEatlng devlcerontEl $ftwaE or

Gurderrne oescnpHon aE ofien tn a Gtatoq


CoDt inG olrtlng. (phy.tet q

iE_

Orho.dbboEtlhE.y.r.r. cEdnAlthorradonsystem

R&onL ol fin.nc., wqL. dt ..i+


l.g.l r.tt E
c6h/ Check, LlneofcEdn

s.h.dul. m.nu.l., ddhent rhar arc


cgqlrrly El|EEd to In orde. to F tom
CS2353 OBIECI ORTEI{TEO ANALYSIS AND OESICN

x.lhod 3! ahdtn, con@ptEt Cta.6 ytrh xoun phie td.ntifi.ation:


xdn phtuc ld.ntllledon ir anotner useflt technique whtch ts bas.d o. n.eut.6.

r It is based on Identiryi.s the.oun..nd nouh ph6s h textuar des.dp0ons of


a dohaln, whl.h 6n be @nsrdeEd as candrdate @nceptusl d$s or

. 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

Miln Src.ar S..mrlo (e 8..i. Ftd):


1. C!.tom.r ardv6 ar a Pos dekout with g6d. and/or $rvte. to purhase.
2. C$hIq stafts a n4 sl..
3. c3hl{ entets lt m ldehtiiicn
4, system re@rds sI. lln. i!.r and plents ft.n dqrtpuonr pdc.r and
runnr.g toLl. pn@ @knlated from a si of prte rut6.
c.shre. epts stepa 2-3 untit tndkatB done.
5, sFtem p@nrs tor.i wtur EE ekltated,
6, C2shrer terrs Custoner tn. r.rat, and asts tor Dlyrcit
7. Customer pays 6nd System handrE pryment,
a. sFteo dp @npletd eL .nd slds $le and paynenr rnformaflon to the
logs
extmal a@lrdng 60. &@nt nq and omdi$ioG) and r

9. Systeh p@nrs e.ipt


to.cGtomer lav6 wlth @eipt and soods (ir a.y).
Eidensrons (or ArtenaEv Ftows):

1. Cashl. ente6 the @sh Emount t nderd.


2. s'sten presents the bnl.n6 dr.. and rcleases the .$h dr.w.r.
3. C hler depGts 6sh tendered :nd retums batance h esh ro customr.
4. system records the csh paymenr.
CS2353 OB'ECI ORIEN'IED ANALYSIS AND
OESIGN
Ul,tr -
W..loq:
. Ir ts ue hpEBIon ol ntu6, t.nguage
i DlrtuEnr noun pha$s ndv.epr6ent rhe
sme @neptuar das
among c,ther
ambtguid*
r It b Ecommeided h @ftbrrairon with the con@ptuat ch$
caregory Ltsr

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

rig l,iliat mS Do,D.in Mod.l

+ Ele!.h nEt gi.s to tind dccrtpdc cta$.?

. A desoipHon ctass contEins tnformaUon


d*nbes some$hg et*,
thar
. Erample: a Pmduct Descrrplon that E@rds the prte, pictuE,
and text
dBdlpflon of an lten. TnE ws fEt named the neft-D.sdtpror patrem
h.
Ue of 'D@t'non, CtE.*.

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

. Everyone wortr.g h the store has amn6ia.


. Every tim a rel physrcl nem rs erd, a orcponding $R{ae lnstan@ of ttem
ls del.ted from'$ftware land.'

' There isstDngdemandtorthe popllarnewvegetarian bursrobled


. The s10rc sdls out, implyin! that all Item rnstancG 0f objed Blrqers
nom dmputer memory,
r Now, hee Ls on Drcbleh: ff someone asks, "How much do Object BUlgeE
6t?", no one n answer, beca@ the mmo.y of their prlce wEs attached to
inventoded iEtanc, which were deleted as they wee eld,
. Here aE some Elated poblm_silh. model, if implem.nr.d I
the doEarn nodei has dupriGte dab,'is spae-rnefndeni ard eEoFpone (due
to epllcted lnfo.matbn) 6e@u* the d6cnp{oi, pn.e, and ltem ID aE
dlpllat.d aor every ftem lnstan@ of dle sahe pioduct.
r fte pEedhs pEbrem rlustrate. the need for oblects that aE desiptlons
($m.dm6 @lled spedfletrons) or oth* thr.gs-
r To $tue the Item problem, what rs neded rs a Pr.duct Dscriptlon .las dEt
Eords rnfom.don about irems.
i A PEdud Desdiption d@s not.epent an ftem, it reprsents a d*dpnon of
hfomanon abod ibffi

;=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

. swtcl .s fDm a @n4pnEt to a $fhrare


DeEpclw,
tnvenrorled nems arc sold and rheir .oft3londinq
nem
dereted, & prcduct Desdipuon sflI remains.
i Ihe need for dBHption da*s rs common in saE,

. it ls atso common in m6nutucturins, whtd


requiE a dsjpflon of a
manlfEcrured rhhs rhat ls diBincr rrom rhe thtng
i&lt

,dd a dhcnption clas (for dampter poduct D6cnpuoh)


when:
. The .eeds to be a d.sdjpflon about an irem
or setuE, indperdenr o, the
om1t exlsre.i e o, any *mpte of $ose kemsorsed,G
r Oelesng tnstan@s or rhinss they des.rrbe (ror
exampre, ttem) h a tGs or
rnforhation rhat needs to be marntahed, btt
was tnorredry
'@trs
6soci.red qith rhe
. Ir redue redundant ordupfcated hrorration.

EErpl.. D..stDtion. in th. Atrtin Dohatn


. as atuther *ahpte, constder an atrflhe company thar surreE
. farat cEsh of one

. rsune ttrat an tne nrgrrts aE can@led for stx nonths pendins


@nDterion of.n
. Ale asuhe that when ntqhts a 6ncel.d, thetr @rspondtno
FIght soltw.re
oblects arc deteted rrom @mpute. memory.
. rherefoE, .fter rh. crash, a[ Ftishr soitwae
objects are deteted,
CS2353 OA'ECT ORIEMTM ANAIYSIS AXD DESIGN

Ddirritr ,bofr Grnd dis.

r If tne only cod of whar atrport a night ga to ts tn the flohr sofhva.


Inst nG, unldl Ep@nt spdfk flrghts n)r a p6rri@hr dare a.d umei then
there ls no long* a l@d of {hat night Dur6 dE atdtne has.
i 'Ine pDblem @. be elvd, both ri[n 6
,!cty @reptrat peEpecdve ln a
dm.ln hodel and fiom . enrvaE D.6D<!E tn tne $ftwaE d6tgn., fith .
fllght D*lp6on dEt deib6 . ftght .nd ns Eute, even wneh . Darootar
cs235i, o$Ecr ouEt{rro ANALY

th6 stntcgis. Eed to ld.htlry $. @@Dnrat


cHt . dohain md.l B.d ror rcpresd rt tn. 6mpn al .l.r.e
Th@ EtEt gie for lidin, th. conephrat .ta$.t
TnEe Sb_dtestes to fird coneptuatcta$es
. Mthod 1r Reuse o. modiry dEting m.neb,
. Method 2: u* a @tegory tist
r M.thod 3: rdenflfy noo phes
Method 1! n u.. dbtlnt rnod.t.
. Reuslng xisting models Js qcellen! bur ourstde our s@pe. The s4ond method,
uslnq a etelory llsr, ts atso osefut,

il.th.d 2: U.e . .a@ory trBi


r ceate a donain body by making a tist of .andtdare onepiud ctas*s_
ilttod 3: lindlrg conestu.t ct... uit6 Nour phE5. rdendnedon:
ndh phd.. ldotiliodo ts another usefut rGchntque whl.h ts based on tingqi.ti.

. It ba*d on identlttng the n6uft and noln ph6s In textuat dsnptions of


is
a dohain, whrch @n be onsrdeed as ondtdare 6neptu.t ct.$.. o.

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

The oreptuat das6 en be rdentfied by idendfytng tne nan Dhr.e.. .rhts


technlque ls susqgted bv ABBoT. T1 s technrque E 6[ed tingutsdc qnatysG.

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.

',ne *$ron Birh rh. slstm can be a@mptished by the

FEm abe ptubem d*.iprion, w en obratn rhe.oneoruat


da$es en b idenflfled by ldendryins rhe noun phles.
fte UML cras d rsEm us'ns the

l- c..*r.-l
rt
F-----
tr**.;l
rl
E ---

/-) rnrr.r afli .y.ran


( T,txnrara rn a*air arour a.rcta q .d tt rrxi s

. 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.

irh asso.iairon is a retaflonship bdween d4es that tndtetes $me h@ntnqfut


.nd inte.Bring @nnection

ts-
L

CS2353 OB'ECI ONENTEO ANALYSIS

I"" rr., ai the senannc Erahorshrp berseel two or


"**** ".denned
more classlrl 6 th at involve c6n.ection. m6ng 6EIr Insta nes.'
a

wh.n to Sho, .n A*eiador?


. aseciano.s usually l6oly knowldse of a Elatlbnsnrp tn.t neds to be pBe ed
fo. $me du6uon rt coutd be mrrirsends or yeaE, dependrng on @ntxt.
r In oulr woras, beMeen what oblects do we need eme memory of a

For examole, do we need to remember what saleslineltem lnstan@s ac


asoclatd wrth a sare rnstane?
Denntely, otheNr* rt would not b pGsrbre to reonst.uct a sale, prlnt a reelpl,
or Glculate a $le total,
. A.d we ieed to remember completed sales h a Leds., for accou.unq and

E euse the domah moder rs . mnceptual peBpedlv. the* statemnb about


the ned to remember rfs to a need in a real situation of the woad, not a
$ftware n@d, although during imprementatron many of the eme needs wlll

In the monopoly domain, se need to Ememberwhat square a Pl. (or Playr)


is on the qame desnrt w.* lf that lsnt remembered. Likewise, we need to
rmemD.r what Pl*
oqned bya pa*idlarPlayi
is
we ned to remember what Squares are pafts of. patlcular E ald.
But on the otherhand, there rs no need to remember that tne Di (or the plu6l,
!idr.ei) tobr indieta th square to move to.
ICs true, but we dont need to h.ve an onqolnq mmory ot iha
move has been made. Lrk*rse, a c.shrer may rook up PrcductD6opbons, but
ther is no need to Ememberthe tuct of a pafticukr Gshier lookhg up partlcular
PrcdudDessrptions
conside r indudin q the forrowrnq assocratio ns
CS2353 OA'CT OPIENIED ANALYSIS AND DESIGN
UNII. II
A$o.latiois 6r whkh xnowtedge of rh. etauoNhlp
needs to be pEse ed ror
$meduEdon (rneed-roreDembef aqraflo.s).
a.*hrioE denved tion the c6mo. assodauoE Ltst,
wty/shourd w. Avotd Addtng [a.y Asoct.tionr?
.\ weaea to aw,p,aoorno too many
.s$oarions ro a dom6,n moder.
. \Drqsins back rnt6 our a,s@re marrenat,e srdrs, you
my Ga[
sDph th n nods, theE Qn he (n(n-1))/2 sshtons to orher
potendary very brge number,
i a domarn modet wtrh 20daes 6utd have 190 a$d.uors, n6t Manv thes.n
tne dbqBm w t obs.ure tr with .vt3ual not*.,
. TnereFft, b paGtmorious aDour addins a*@iadon rh6.
r us tsE cdrerion guid[nes slggBred tn thrs chapEr, and fods
on ,ne.d,to-
remembea ai,ar.ons.
will th. asciadon. B. tmpt.hdr.d h sonw.r.?
r Dudns domah nodetins, .n askiadon is not a *temenr:bout
dat nom,
ditabe foEEn tcy rebuonrhiD6, insrane 6d.br*, or ob&.t @nnecflons
in a
softw.E $tuflor; ir ts a st remenr that a reta onsh,p ts menlngnrt
in a pucty
conceptut peEpe ve h th. @t domain.
r That eE, mny of rh4 rer.tionshtps w t be thptem.nt d tn $ftwac paths
.s
or .avlgation .nd vGtbflty.
r But fB domatn modet is .ot . data modet; .sqiadoc aG added
to hrghlght
olr mugh undeErandtng ot not erthy ebnon.htps, not to do@hent
oblect or

Ar a$odation ts Eplented a. a the brw*n dases wiBI


a @ptralt2ed as*bton

"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.

. sat. patd-by C.shpayment


o bad u.mpte {do6nt enhane meantnq): sate Uss eshpayment
r Player rs"on s!u.E
6 bad eempte (doesn,tenh.n@
ffsnhg): ptayer Has square
Ascladon nam6 shoutd stErt wi$ a ep,tat tener, dne 6n .sciaflon Bpcsents a
defier of llnkr between iisr.nes; ln rhe uML, .tasstfeG shoutd .t ft wtul a 6ptat

r@ @mmon and qua[y teoat fom6ts for a mp.und asocianon name arc:
. R@ds cumnt

ed a rct.. Ros m.v ophoMny tuE:


t muloplldv explGton

. navtsab ry

fiultlplr.lty dennes how many tnstanG or a dc A en be &$dated wlth one tnst ne


CS23$ OA'ECT OPIENIIO ANALYSIS AND DESICN

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

'nE munipttdty value @mmlnt@rs ho many trEr.n6 can t vsltdty


asdated wth anorher, at a pritcular mon.n! ather than @r . span of the,
For mmple, tt ts p.stbte that a lsed 6r coutd be repeatedty
sotd back to ued

But nt any parucutar mom6r, the er B onty srocked_by one


deat.r, the 6r E
notS&d+y many d6leE at any p.rflcutar momenr.
slmlla.ly, h countrtes wtth moDogamy taws, a pe6on c.n be 6ded toontyon.
dher peEon at any par{cutdr noment, 4en rhough over a span of ume, that
em. pe6on may be narted ro ma.y pe@ns,

daeloper, becau* ir communlcares a domatn @nskatnt ttat w t


be (or @uk b.)

t
CS2353 OfuECT ORIENITD ANALYSIS AND OESIGI!

ddplcity k @ntdr dopdddl

ha,'kld@6huhEdEd!hdd ,,lkry md p@!y. ft ndh6, mmr..b.


dBnd.dtuh@tu!.h&bddbdie,r6brdr,cnrn6pM'@nEi.d
nM6Msrdbh,!.. tu.d4reatstuh,brqb6comd,ots ;,.drEebu
leH&fuM,FM,L6,dil{,fhbqbrbd,
tuH @ tuu !6Fd n tutd,ldhBh dffi
EsM5fuht',8EM*sbmMbltsfu's!n!l@oh h tu{h4 FoaDrd h lllG

dD6BrtrrEbrdb@rr@ruErstua!.E!6s(MEMd6L!dtu,di;r4'

hdicating if a Pe6on jnstane uorks ror one or many company instancs ls


dependent on rhe @ntdt of the modejj the tax deDartment is lntersred h
manyj a unlon probabty onty one.
r lrre dlor@ sualy dpnds on rhy we arc buitdinq rhe software.
Uultipl. A.sdation. B.tweo rrc d*6
. Two classes m.y have mutlipte associations berwee. them h. uML ctass
dlas6n: thls is not un.omm.n.
TneE ls rc outslandhq &nde h the pos or Monopoty ca* strdy, but an
e&mple frofr the dohain of rh ainhe E the retaflon.hipd between a Fltght (or
perhaps moE pred*ly, a ftighrleg) and an airport

lrultre asso.itd,onr,

80w to Find Arso.taions -tth . cmho. a54i.tio!s U.t


. star. the :ddition of asodatjons by ustng th fisr h f!b]!.
. 1t @nta ns omhon cateqonies that.re worth considerrng, *peca[y ror bus n*
EEmpl6aEdEwn from rhe 1) pos,2) Monoporyrand3) ainhe,*eNation domains,
CS23s}B'ECT ORIEXIED AIIALYSIS AND DESIGN

a rs a tEecuon rehted to .nooer tEnsacflo. B

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

a. Dk.ula In d.tait .bout a@i.rid. and att ibur6

i The as*buong ts the hosr @mmon type 6f retaflorsh p lsed UM!,


r The asdanon E betreen the .lass6 0r insrane of ct.sses,

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

wlEn to .he .. A!.*ta on?


, Ihe as*raflon retatonship is used In UE sysrem dsion when we want th6r the
Elatlon betwen two objects hd to rmehbered tor eme sm.,
r The assoctaflon retaflonshtp an be defined ffom the @mson Miation tist,
. U* or too many askraflon retaflonships h rhe clas dlaqEm must b awaded.
H to rcpB.nt Awirti.. th UXL?
i rhe asodaflon rsrepre*nid bv a rrne betyve. the cl.s6.
The a.*i.tton n.m mrst be denored by rhe srrhg wnh fiBr tns
.apttat.
The eids of assocraflon must EpEenr the mutipfctry apEssion indicafinq the
nunerlol relatton between the .tasses.
. ushs the srmple ascation names lke H.r or u.. tead, to tss undeEtandins

. Hen@ more apprcpnaE verh6 @n be u*d to denore the ass*taflon name.


r Most mmmonly u*d asdaHon names ar-
CS23$ OA.,ECI OPJENTED AMLYSIS AND DESIGN

4_ Alt6dsa
5, A tsus/rerums B
5. @Dmunlcte. ,ith a
7. A^ rs fo0owd by s
3. A js owned by s

wh.t l. mul pticity tn .n ...diadon?


To the ends of rh astafion
the mutflptictty must
v.rroos mutHp[c]ty varu6 arc
-
. zero q moE r_e many(denored by
r 1
one or rcre (denored by *)
. one (denotd by 1)
. EcdY 3 (denotcn by 3)

Hw to n d .*ei.don *iur
tulrowhg rabte shows drfierent
be ldeftned fom ue ommon

I ana a are tEnEd6ii i6.Babn b rcbt d to the


and they ae Gtated wtn @nm.{o ot Rsery:flon
a rs a rore ahrr B-F !u@me oak6 the p.rh.nt
LibErrrn isu* ll6Ery Card
A rs rosr@t oi phGiAi Lu*oh.r has LrbEry c.rd

^ E iqeecny or pnyscaly

a b-firb-er or-d-- strdnt is a mehbei;EiE;i


qem*us A@una

PrEesd B,

L.
CS2353 OB'ECT ORJENTED ANALYSIS AI{D DEsIGN

. Attribut ls a loqlGl data value ot an objecl


. It is nct*ry to rdentify th attnbuts of onceprua, clases so that infomation
Equired by the systeh @n be represented.
. The atElbutes ae needd when eme speclflc

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

AtElbute .nd D*iv.d AtBibures

i.-- -- - - I"r+"L*" 4
Llgil L.-<-- ! -

spe.lfied rnh rubrk, Drjv6te or Drctected mode,


notationshrcor*pondinq visibility.

r If the atrribure is ndcworthy and dsivabte then we ptae / before iE name,


GUIDEUXE FOR MODEIIXG O^TA TY'ES
r varrous data ryps that ar used ror spdrytrg the
Number, characrer, strinq, nme aid so on.
other common typ6 aE Phone Number, unLveretty seat umber, zrP ode and
CS2353 OB]ECT ORIENIED ANALY$S
I]lD DESIGN

r Ine @neptuat cla*s nusr he a.el{ion and not ut$ .n


.ttrlburc. For Ehpt.

comptex @neprt should nor


De
conepts en h. nepsutard rn a

attribures mur nor be so{n e roretgn key!, Insread of uEt rhe


as*bt,on
For oampre.r rhe ael{umb4 acrs as a
bE'gn k V rre de custoftr rhen
tr B undesJEbh bur tnsrsd of lnat if 'n
we nate tne two das cu.tand.nd
A@ut havi.g tte attrtbure mh. and A.ct{!mb.r
Gpecflve& rhs tr rs

49
CS2353 OBJECT ORIEIIED ANATYSTS AI1D DESIGN
UNII - N

. flre :prrcp.tate qErniy should nor b sp&red h a ptatn number stmpty


insred of rhat $me untt musr be ssoctared wirh tr.
' for shde- nr. QBntiv ctass ts asdated wtrh rhe ctass rr.m and the
@'ght of rhe ircm Gn be sp*tfied h some untr,

0. Cxpl.h ahcut Aggrcg.Uon and comp.i,tUon

. &gEoatton !r a vaque ktnd.of assoctauon in the Uti4L that too*ty suog*rs


uhote-part reladonshrps (8 do mahy ordhary assel.dons).
.
composttton, atso known as comp.stte agg.egaoon, ts a sbonq klnd or whote-parr
agoreqatton and E u*fut to sh.u h sode mo.rets.
a @mDctlon rtaronshtp amDti6 th.r
1. An lnstdn@ of the pan (such as 6 sq@re) betong, to onty one ahpGtte
tnstEne (such as one Eoa.d) at s 0me, .fte paft must always betong ro a
cohpctte (no ne4n@ons finqe6), ard
2. The @mpostte is Esponstbte for the @adon and deteuon of trs pa.ts enher by
Itsell oadng/deterhg the p6ts, or by co aboErnq wiur orher objeE.
. Relared to thts onstratnt rE tnat f rhe @mposne ts dstEyed, tts Erts mult
etns be drroyed, or atrr.hed ro andh.r ompGtte no free fioa ns frngeE

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.

Consldr dDwtnq ompostflon when:


! Ine lretime or dle plt is bound wtrhtn the [fedme of the @mr6tte rheE
is a
@te-detere dependency of the pat on the whote,
. there is an owbus whote,palt phystGt or togtel asmbty.
. Some pEpeides ol $e ompostre propas.te to the pa.r., sudr as the b@non.
. OpeEtl,rns appried to the @mp4rte prcpagdre ro the paG, sudr as dsh.flor,
mowmenr, and @rd,no,
len.6r o, showt.s c6hp.rhto.
. Identlfyng and ustranng @m!.st on is qutte rea$nabre to qctude t n.m a
domaln hod.l.

\
CS2353 OB]ECT ORIENIED ANATY5IS AND
DESIGN

. D@w ed;how @nposir,on beus. ,t has rhe rolowrns beneiirsi


whkh El.te to tbe d4tgn Ether $an rhe anarysts,
r It .r.dfi6 rhe doma,r conrarts resarding th et,srbte
en.tene of
rndependenr of the whote.
. ln @hp6tte aggEgatton, Ble parr may not erst
outstde or the tferlm of 6re

During desron uork, rhts has .n hpad


on the c@te-detete dependendE
beb 6n the whote and part sottware da*s and
darabse erement! (in tems ol
e6eErtral htesdty znd esedhs detete p3ths),
It a$lsrs in the hentifGton of a c@tor (the @mpst) ushc oE GRASp

. opeEuons skh as copy and delete appled to the whore often propaqare
to the

cohpcnton i. rll. t{dtcn Dom.i. itod.t


' in tne pos dom6tn, the s;Eunetens may be @nstderd a p.r of a
sale; h
gene6t, rGnsadlon tine Jtehs ar vr ed as pans
of an
tranection (* FtouE 1.
i ln addttrnn to ohfomane ro that patrem, rhere
is a c@te-cehr
oE lhe nems on the sateune rtens tfttime ts bound
wtlhrn uhe
S.le.
A9grqtatl6n ln tt6 poitrt-ot-st .r!Id.n_

__- rf-'!du.. l
r..'Lp@rero i

Ey sinJrar Justifr@don, prcductcatatoq ts


a composrre of
P@duco@iptions.
{oother rlauonshtp is a 6mpe[in9 @mbhatlon that suggests
whote-pat
Emantl6, a creare detete dependency.

t-
C52353 OB'ECT ORIEMIED AXALYSG AND DESI6N

10 .Exptatn h d.t it about O* Hl.nrchie


. Tte conept GshPaynen! crednpayment, and ch*kp.yment rre a| very
sim ar,
In tnE sftuaflon, lt ts p..stbte to ooante tho into a geneE uaton-
speclallz.tlon clars hteErchy In sht.h the .up.. .tar. paymenr Epresents a
m@ qenchl .oncept, and tne subct*4. hoE spectal4d ons,

I'su-*@;Lr
ldrB

tdstfyhg commonaltry
GeneElazatlon rs the actvtty of
denrhq supeEtas (qeneral @n@pr) and subda$

It ls a way to mnsfircr taxonomtc chsstf@bo.s amonq otuepts shrch


a@ then
lllusfted h class hiEEhtes.
. ldent ying a perclass and subdass.s is of v.tue h a don
thelr p@ne attds us to undeEtand oncepts tn more gnerat, cffned and
ah6tr.d tem. ft lds ro @nomy of qp@ton, tmpEv.d @mprchensto. aid
a Edldon tr e9@ted Infomflon.
And alihough s..E
th@sins now;n the Up Domajn xoder .nd nd
D6lgn Model, tha tatr d6i9n and tmptenenraUon ot suDets and
$fts.E .rasg $at e rnh..tbnc. yEHs ben. efrwaE_
Id.ntry (todah superdasis a.d Eubdass Elehnt to tne @ne
rrrustEte uEm tn tt. Domatn ModEl.
UML to eview oE seneBl2aflon notanon t.Rodued h the ux! of
snemlbtion
Elatbnshlp betwen etemqts ts hdtcatd wlth a talge hole
fiangle p.hrhg to
the moE geneEt eterenr fDm u:e moE sp*iatEed one.
Either a sep.Ete target or .i.rEd rarget .r@w styte may
bg used.
C52353 OB]ECT ORIEI{TED
ANALYSIS AND OESIGN

Oass hierdrctiy with sparnt


and sftared

,.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

G.n.r.It2. ft ,^a Ct.$ S.rs


, coneptlat subcla$6 and superctass.s

: :liTlt": "" **,, ;;#il;H::"T1:.rfi#lH-


a Etated in

membe61p, c[ tnsrarc4 orlhe


aE aho @mbe6 of tte
*t credt iyment
*t payment.

a
CS2353 OBIECI ORIENITD ANAIYSIS AXD DESIGN UNTT - U

havenn dragEfr,0 5BshM ash flqure,


venn da06h or.d r.larionships

--,t',d----.--.

r Wh.n . .la$ hleEEhy is @td, st rem.^t about 3upeda$* that appty ro


subdasB ae mad,
! Fbr *nple, Flgue stares th.r aI PaymHts have an amounr and aE a$dated

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$,

@nveys the nodon of ser membeEhte


@nforman@_

a potentbr subde shoutd @niorm to the:


r 100% Rute(definibon onformane)
. rs-a Rure (set hembEhlp conrorman@)

wlrs to D.tin. . cohc.ptral Sub.ta36?


. Rul6 to ssure rhar . subcta$ is ore.r have been
erahlned (the rsn dnd
10o% ruts), However, whei shoutdweden bothertodennea
sub.rais?
. FiEt, a defi.ii.n: A conepruat ctass partlbdn rs a divlston of a @n@ptuat
das
i.to dtsjohr sub.tass (or typ* in ode[,s reminotosy).
. The cuBtion may b restaid asr ,when is tt usefut
to show a @n@ptud.hs
. For ex.mple, ln the pos domah, cusbme. may
be @re.uy paditioned (or
subcrased) tnro Matecultomer and remdtecurromer.
trs.t on..ptuat das p.rdrion, hn i, ir ns.fut b ou. domain?

r4oddior. to Padition . con..ptu.t cta$ inro sub.tassq


ne forrowing aE nong motivauons to parriflon a cla$ inro sub<ras6:
cate a @nepruatsubcrass ofa superctass when:
1. Ihe subcta has addttionaiaR.ibut* oftnt.est.
2, Ire subcta$ has adduon a I a$oda ons of tnterest,
3. Ine subdc con.ept is operated on, nandled, rected
to, or na.tputar.d
differendy than the supercta$ or other subctases, i. ways
thar aE or thtEsr.
4. The subdass @ncpt Epresents an anifrate thing (ror exampre,
antnat, obor)
that behavF diffeEnry than rhe superctass or other subda*sr in ways th.t a.e

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

The 1blass has addtronat afrdbutx .r


LibEry subcla$
LoanableR6ou@, has an ISBN

Ine sub.la$ has .ddti.nat as@t.tions or Paymente creditP.yment, subda or


P.ynent, ls asiated with a

LlhEry Mde, sub.rass of


LoanabkReu@, ls asselated with

fte iub.tas @.pt is operated upon, Payments rednPdymenl subcla$ or


handld, reactrt to, o. maniputared dirturenfly Paymen! rs handred diffrently than
$.n th. supercta$ o. other sub.rass, tn other klnds of payhents in how tr ts
GF tnat aE of hb.st.
LibEry software, s0bdass of
LoanabkReuE, reqd6 a dposir

Ihe subcla$ @n@pt rcpreseDr! an antmate


thrng for .xampte, anrmar, bbot) th:r
behavs dtfferenfly Market Research MaleHuman, subclass
o6er subclasses, tn ways ulat aE of inreresr. of HunEn, behavE dtrfeEnty than
FmaleHuman wivr resped to shoppinq

!o Dstrne a con.. uat sup*.ta;t


Generalrzatron into a @nmon superctass is usuany advtsed when @mmonatEy rs
identifid amonq @tentiat subdass6.
. The fol oslns are notivaHons b sener.lze and deflne a supercla$:
CS2353 OB,'ECT ORIENftO ANALYSIS AXTI
DESIGII

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

11. D.etb. .bout ab6tr..t aonc.ptuat cl..se


ab.tEct coheptuat ct..*
i Ir ts usetut to lden fy abstEct cj*s6 h rh
domatn modet
@draln whar .t.ss6 it rs pEtbte ro hare @n@te rnstancB
of,
the rutes or the Drobtem d.mah
. 1r every menber of a ctass C mosr arso be a
nember of a
is crred an ahEct onceptlal dass,
r For *ample, assume rhar evry p.ymenr
inn ne mlsr more specifroly be .n
hstance ot the $bds c.Edttp.yment, cashpayrerq or heckpaynenr.
. This rs i[GtEre., h
the venn dhgram of Ftoure (b), sln@ every pay,nent
member is atso a member of a sbckssr paymenr
ts an ahsract .oneptuat ct.$

Alrsh-dct con.eptuat dass6.

,(o --"''h,-._

,t",*,...-,
-

'=2)

**)

Pr"ra,ed Br,
CS23S3 OBIECT OR]ENIED ANALYSIS AITD DESIGN UNTT. U

r By @ntEst, it there can be layment hstan@ that are nor menb* of .


5!brl6, it is not an abstracr dass. as i[usrrared In figure (a),
In ihe POS donatnr every p.ymenr k reauy a nDb.r of a subcla$.
HguE (b) is the @rred depicflol or pa@enrs; UleEfoei pdymenr h an abstracr

Ab.tr..t cl..r t{ot tl6 ir th. uitl


To dl*r the UqL pEvtds a noratioi to lndtdte abft.t da$es rhe cra$ name ts

:,*,".*- 1
r!"'t" l
I hdd.dbt16,6
I
a

Idanit absF.cr dasG and iltustr.te them wfth an tafidzd nahe


aErn {abstEct} reywoRt.

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

rhis hads to the folowhg mod;thq pnndDte:


r In a domatn model, tr a cta$ c .an simoltaneously have many
varu for the
sahe kind of attrthur a, do not pta.e
r Place attribure A tn anoiher ctass rhar Is associared
utth c.

r A Pecon nay hare mahy phone numbe6.


r Pra@ phone number Jn another cra*, su.l1 s phoneNrfib.
contadhformanon, .nd asociate manv of the ro ,eIFn
Ir'e .bove pnnopte suqgF\rs r

r In the buslness wond, what conceDt Llmarry ,@rds


the informauon Etated to
th. seryr.es that a seNi@ povide ro

fiBt anenpt ar modetns r,ie merchanuD pEbt.m.

tne ract that !.rh Srore and AurhonzanonseryEe ac EEted to serutcecontract


ls a crue rhat it G dependent on the etauonshtp hehieen the rrc.
'rhe merchaiuo may be oDuqht of as an atrtbur
retated to rhe assftiaflon
btuen Store and Aublortzaionsefri@_
Ihis l@ds to the notion of an as&o:aflon ctas, h whtch we can add Latu.s to

seRicecontract may be modered as.n asdation d.s etated ro rhe


assoclaflon
between sroE aDd auoDnzaflonseNtce.
In the uJ\lL, this is tustsated wih a dashed line trom the asso.iation to rhe

Figuru vlsualry @mmuntarB the tdea thar a seM.eco.fid


.nd irs attribure
aE Elated to the asctaflon berween a stoe.nd aldDr,zasonsBl@, and
thar
tie rrfedme of rhe se lcecontE.l ts depndent on th. etanonshtp_
cs2353 06_rEcr o&EN-rED All LYSIS AND DESlbtV

An asso.iarion das.
f,e;;;I;;-l
tllirY I

Gdd.lln6 for addho .sdation da$6 tncrude


clues lhat a. assoctauon cta$ hisht be usefut in
. an.ttnbde is Etated ro an assocta on.
. hslances of the asociauon c dep..den.y on the 6sclation-
. rh* E. hany-tcmany as*iarion behveen two @nepts a.d hfomatton
asdated wtth the asso.iaflon itserf.
Ihe presence of a m.ny-to-many ass@taflon rs
a @mmo. clue tht a u$ful asctatton
cla$ ls lurkng h the ba.ksrcund som*here; when you see oner @.slder an

FIqUE rrrustrates some other ebnD,es of asso.tanon


CS2353 OBJECT OFIEIIITED ANALYSIS AND DESIG]Y

13. Erplaln about ..Uvlry diasram wftn .n d.rd..


ui,rl activtly dtaer.n
r Basic UML acrvtty dtaqm notEflon is shown rn Frgure, tustEting an aaron,
partition, fo.k, Join, and object node.
. In essei.., ths dtaqram shoc a sequene of actrons, some ot
whtch may be
paEl,et.
. l.id ot rhe ioraflon is setFqptanatory; two sobte pohts:
. one an actton is ftnrshed, there is 6n auromauc ourgohq tEnstuon
r -Ihe dlaqEo .an show bdh @n!ot flor and dat! now
aa.i. UML..dvlty diagr.h not tion.

,_: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.

You might also like