5 structural modeling

Upload: putri-irma-k-bratawijaya

Post on 07-Jul-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 5 Structural Modeling

    1/21

    5-Structural Modeling17 September 2015Review Use Case

    Class Diagram

  • 8/18/2019 5 Structural Modeling

    2/21

    riting !"ective Use Case

  • 8/18/2019 5 Structural Modeling

    3/21

    #ctivit$ Diagram %w&enneeded'

  • 8/18/2019 5 Structural Modeling

    4/21

    #ctivit$Diagram!(ample

  • 8/18/2019 5 Structural Modeling

    5/21

    Structural Models

    • Represents t&e data used ) created b$a s$stem

    • Describes data captured ) &ow data

    relate to eac& ot&er

    • #re logical models

    • #re tec&nolog$-independent %in #nal$sis

    *&ase'

    •  +$picall$ used ,or +o .e/ S$stem

  • 8/18/2019 5 Structural Modeling

    6/21

    Relations&ips in StructuralModeling

    • eneraliation is a 3ind o,/e(4 !mplo$ee is a 3ind o, *erson

    #ggregation is a part o,/e(4 Door is a part o, a Car

    • #ssociation catc& all/e(4 *atient ) #ppointment are

    #ssociated

  • 8/18/2019 5 Structural Modeling

    7/21

    #nt&ropomorp&ism

    • +o treat classes as i, t&e$ were&uman4

    • &o or w&at are $ou

    • &at do $ou 3now

    • &at can $ou do

    • 6elps to create CRC Cards

  • 8/18/2019 5 Structural Modeling

    8/21

    Structural Model 2 *arts

    14 CRC Card %Class Responsibilit$Collaboration'

    8 ritten ,orm used to document responsibilities )collaborations o, a class

    8 Used to build Class Diagram

    24 Class Diagram %similar to !R Diagram'8 rap&ical model o, classes ) relations&ips

    among classes

    CRC Cards are created frst;Class Diagrams are then created rom CRCCards

  • 8/18/2019 5 Structural Modeling

    9/21

    CRC CardsFront: 

    Class name: ID: Type:

      Description:

    Responsibilities: Collaborators:

    Back:

      Attributes:

      Relationships:

    Generalization (a-kin-o!":

    A##re#ation (has-parts":

    $ther Associations:

  • 8/18/2019 5 Structural Modeling

    10/21

  • 8/18/2019 5 Structural Modeling

    11/21

    Class Diagram Components

    # C9#SS

    #: #++R;.U+!

    #:

  • 8/18/2019 5 Structural Modeling

    12/21

    Class Diagram

  • 8/18/2019 5 Structural Modeling

    13/21

    :otes on #ttributes

    • Derived #ttributes >/calculated ,rom ot&er attributese(4 #ge

    *ublic #ttributes =/:ot &idden ,rom an$ ot&er obAect

    • *rotected #ttributes B/6idden ,rom ot&er obAects %e(cept subclasses'

    • *rivate #ttributes -/6idden ,rom all ot&er obAects

     

  • 8/18/2019 5 Structural Modeling

    14/21

    :otes on Relations&ips• # Class can be related to itsel, 

    • Relations&ips involve Multiplicit$• #lso called Cardinality • ero to

  • 8/18/2019 5 Structural Modeling

    15/21

    Multiplicit$

  • 8/18/2019 5 Structural Modeling

    16/21

    #ssociation Class

  • 8/18/2019 5 Structural Modeling

    17/21

    eneraliation

  • 8/18/2019 5 Structural Modeling

    18/21

    #ggregation %9ogical' )Composition %*&$sical'

    9ogical implies t&at it is possible ,or a

    part be associated wit& multiplew&oles or t&at is relativel$ simple ,ort&e part to be removed ,rom t&ew&ole

    *&$sical implies t&at t&e part can

    be associated wit& onl$ a singlew&ole4

  • 8/18/2019 5 Structural Modeling

    19/21

  • 8/18/2019 5 Structural Modeling

    20/21

     +e(tual #nal$sis o,ReEuirements

  • 8/18/2019 5 Structural Modeling

    21/21

    *ractice !(ercises14 Describe t&e

    ,ollowing classdiagram wit&$our own word

    24 Develop a usecase and a classdiagram ,or caseno4 F %Picnics R

    Us' in 5-usecase4doc