Syst e m s An a lysis a n d
Syst e m s An a lysis a n d
D e sign w it h UM L V e r sion
D e sign w it h UM L V e r sion
D e sign w it h UM L V e r sion
D e sign w it h UM L V e r sion
2 .0 , Se con d Edit ion
2 .0 , Se con d Edit ion
Alan Dennis, Barbara Haley Wixom , and
David Tegarden
a d
ega de
Copyright © 2005
J h Wil
& S
I
John Wiley & Sons, I nc.
All right s reserved. Reproduct ion or t ranslat ion of t his
All right s reserved. Reproduct ion or t ranslat ion of t his
work beyond t hat perm it t ed in Sect ion 117 of t he 1976
Unit ed St at es Copyright Act wit hout t he express writ t en
perm ission of t he copyright owner is unlawful.
p
py g
Request for furt her inform at ion should be addressed t o
t he Perm issions Depart m ent , John Wiley & Sons, I nc.
The purchaser m ay m ake back- up copies for his/ her own
The purchaser m ay m ake back up copies for his/ her own
use only and not for redist ribut ion or resale.
The Publisher assum es no responsibilit y for errors,
om issions, or dam ages, caused by t he use of t hese
om issions, or dam ages, caused by t he use of t hese
program s or from t he use of t he inform at ion cont ained
herein.
Pu r pose of St r u ct u r a l
Creat e a vocabulary for analyst s
d
and users
Represent t hings, ideas, and
concept s of im port ance in t he
applicat ion dom ain
Cl
Cla sse s
Tem plat es for creat ing inst ances or
Tem plat es for creat ing inst ances or
obj ect s
Concret e
Concret e
Abst ract
Typical exam ples:
yp
p
Applicat ion dom ain, user int erface, dat a
st ruct ure, file st ruct ure, operat ing
At t ib t
At t r ibu t e s
Unit s of inform at ion relevant t o
Unit s of inform at ion relevant t o
t he descript ion of t he class
Only at t ribut es im port ant t o t he
t ask should be included
t ask should be included
O
t i
Ope r a t ion s
Act ion t hat inst ances/ obj ect s
Act ion t hat inst ances/ obj ect s
can t ake
R l t i
h i
Re la t ion sh ips
Generalizat ion
Generalizat ion
Enables inherit ance of at t ribut es
and operat ions
Aggregat ion
gg
g
Relat es part s t o w holes
A
o i t ion
Associat ion
Miscellaneous relat ionships
Slide 10
Y
T
You r Tu r n
What classes at t ribut es and
What classes, at t ribut es, and
operat ions t hat would be required
t o describe t he process of
t o describe t he process of
Re spon sibilit ie s a n d
C ll b
i
Colla bor a t ion s
Responsibilit ies
Responsibilit ies
Knowing
Doing
Collaborat ion
Collaborat ion
Obj ect s working t oget her t o
service a request
M
At t ib t
M or e on At t r ibu t e s
Derived at t ribut es
Derived at t ribut es
/ age, for exam ple can be
calculat ed from birt h dat e and
current dat e
Visibilit y
M
O
t i
M or e on Ope r a t ion s
Const ruct or
Const ruct or
Creat es obj ect
Query
Makes inform at ion about st at e
Makes inform at ion about st at e
available
Upd t e
Updat e
Changes values of som e or all
Slide 20
Ge n e r a liz a t ion a n d
A
i
Aggr e ga t ion
Generalizat ion show s t hat a
Generalizat ion show s t hat a
subclass inherit s from a superclass
Do t o
n
e dm in pe
onnel
e
Doct ors, nurses, adm in personnel are
kinds of em ployees
Aggregat ion classes com prise ot her
Aggregat ion classes com prise ot her
classes
H
l h
l
i
d
f
d
M
R l t i
h i
M or e on Re la t ion sh ips
Class can be relat ed t o it self
Class can be relat ed t o it self
( role)
Mult iplicit y
Exact ly one zero or m ore one or
Exact ly one, zero or m ore, one or
m ore, zero or one, specified
range m ult iple disj oint ranges
range, m ult iple disj oint ranges
Associat ion class
Sim plifyin g Cla ss
D i
D ia gr a m s
The view m echanism show s a
The view m echanism show s a
subset of inform at ion
Packages show aggregat ions of
classes ( or any elem ent s in
Obj e ct I de n t ifica t ion
Obj e ct I de n t ifica t ion
Text ual analysis of use case
Text ual analysis of use- case
inform at ion
N
t
l
Nouns suggest classes
Verbs suggest operat ions
Creat es a rough first cut
Pa t t e r n s
Pa t t e r n s
Useful groupings of classes t hat
Useful groupings of classes t hat
recur in various sit uat ions
T
t i
Transact ions
Transact ion class
Transact ion line it em class
I t em class
St e ps for Obj e ct I de n t ifica t ion
d S
l
d li
a n d St r u ct u r a l M ode lin g
1 C t CRC d b f i t t l l i th
1. Create CRC cards by performing textual analysis on the use-cases. 2. Brainstorm additional candidate classes, attributes, operations, and
relationships by using the common object list approach.p y g j pp 3. Role-play each use-case using the CRC cards.
4 Create the class diagram based on the CRC cards 4. Create the class diagram based on the CRC cards.
5. Review the structural model for missing and/ or unnecessary classes, attributes, operations, and relationships.
6. I ncorporate useful patterns. 7 Review the structural model
Slide 28
Creat e CRC cards
Creat e CRC cards.
Exam ine com m on obj ect list s.
Role- play t he CRC cards.
Creat e t he class diagram
Creat e t he class diagram .
S
lid
e
3
S
underlying st ruct ure of an obj ect
-orient ed syst em .
y
Const ruct ing t he st ruct ural m odel is an
it erat ive process involving:
t ext ual
analysis, brainst orm ing obj ect s, role
playing, creat ing t he diagram s
, and
i
t i
f l
t t
Slide 32
E
di
t h
D
i
Ex pa n din g t h e D om a in
A quirky and int erest ing t ut orial
A quirky and int erest ing t ut orial
regarding CRC cards can be
f
d
found at :
ht t p: / / w w w .csc.calpoly.edu/ ~ d
ht t p: / / w w w .csc.calpoly.edu/
d
EOC Q
t i
Ch
t
7
EOC Qu e st ion Ch a pt e r 7
8 . H ow do you de sign a t e t h e r e a din g dir e ct ion of a y g g
r e la t ion sh ip on a cla ss dia gr a m ?
9 . For w h a t pu r pose is a n a ssocia t ion cla ss u se d in a cla ss
dia gr a m ? Give a n e x a m ple of a n a ssocia t ion cla ss t h a t b f d i l di h d
m a y be fou d in a cla ss dia gr a m t h a t ca pt u r e s st u de n t s a n d t h e cou r se s t h a t t h e y h a ve t a k e n .
1 0 . Give t w o e x a m ple s of a ggr e ga t ion , ge n e r a liz a t ion , a n d
a ssocia t ion r e la t ion sh ips H ow is e a ch t ype of a ssocia t ion a ssocia t ion r e la t ion sh ips. H ow is e a ch t ype of a ssocia t ion de pict e d on a cla ss dia gr a m ?
EOC Q
t i
Ch
t
7
EOC Qu e st ion Ch a pt e r 7
1 1 . I de n t ify t h e follow in g ope r a t ion s a s con st r u ct or , qu e r y, y g p , q y,
or u pda t e . W h ich ope r a t ion s w ou ld n ot n e e d t o be sh ow n in t h e cla ss r e ct a n gle ?
Ca lcu la t e e m ploye e r a ise ( r a ise pe r ce n t )
Ca lcu la t e sick da ys( )
I n cr e m e n t n u m be r of e m ploye e va ca t ion da ys( )
Loca t e e m ploye e n a m e ( )
Pla ce r e qu e st for va ca t ion ( va ca t ion da y)
Fin d e m ploye e a ddr e ss( )
I n se r t e m ploye e ( )