220 likes | 348 Vues
This guide provides an in-depth look at UML Class Diagrams, highlighting their role in static modeling of systems. It covers the design class diagram (DCD), which includes more details than domain models. Key concepts such as attributes, association lines, dependencies, and composition are explained with clear notations and guidelines. Learn how to represent visibility, multiplicity, and qualified associations effectively. This resource is essential for anyone looking to master UML Class Diagrams and enhance their system design skills.
E N D
Class Diagrams • Used for static modeling, i.e. modeling the static aspects of system • Design class diagram (DCD) – used in design model, incorporates more detail than class diagram used for domain model
Attributes • How to show: • Attribute text • Association line labeled • Attribute text notation: name : type Use +/- for visibility of attribute
Attribute as association • Association line (in design model): • Navigability arrow • Multiplicity • Role name • No association name
Attributes Guideline: use attribute text for data type objects, use association lines for more substantial objects . . .
Dependencies • Dependency relationship: client object has knowledge of other object • Dependency line used in UML to show: • Global visibility • Parameter variable • Local variable • Static method
Composition • Two closely related concepts: • Aggregation – part/whole • Composition – stronger form of part/whole (Note: for our purposes we will not make the distinction and just refer to it as composition.) • Notation: • Use (closed) diamond • Do not label association
Qualified Association • Qualified association • Provide a name for one end of an association • Usually reduces multiplicity from many to one • Names an item within a context to show uniqueness • Example: File – Directory: use a filename as a qualifier
Association Class • Association class • Allows attributes that more naturally belong to association than to either class • Example: Company – Person with association Employs, Salary more naturally belongs to association than to either of classes