04-06-2012, 10:46 AM
Construx Software
Construx Software.pdf (Size: 37.92 KB / Downloads: 124)
Basic Concepts
• This is the main “internal” view of the system
- The focus is on static structure, things about the
business policy/business process that should
(effectively) always be true
* A formal methods person would call these
“invariants”
• The main concepts in class models are
- Type/Class
- Attribute
- Association
- Generalization
Type/Class
• A Class is the descriptor for a set of objects with similar
structure, behavior, and relationships
- “Class” tends to be interpreted as a design and
implementation concept while “Type” tends to be
interpreted as an analysis concept
Association
• An Association exists when some number of objects are
connected (linked) in some significant manner and it is
necessary to remember that connection
- In set theory terms, each class corresponds to a set of
things, and an association corresponds to a mapping
between members of these sets.
Multiplicity
• Describes the rules about the number of objects in each
class that may or may not be linked
• “Anchor point analysis” [Flavin81] is a useful tactic to
help you determine multiplicity. It is based on the question
“Assuming that I am an object of this class, what
is the minimum and maximum number of objects
in that class can I be linked with?”
The question is repeated from the point of view (“anchored
at”) each of the participating classes
• Example
If I were an Aardvark, what is the minimum and
maximum number of Burrows I could live in?
If I were a Burrow, what is the minimum and
maximum number of Aardvarks that could live in
me?
Navigability
• In some cases, an association is constrained to be
traversed in certain directions and it may be useful to
include this information in the model
- Uni-directional associations can be traversed in a
single direction only
- Bi-directional association can be traversed in either
direction.
Aggregation and Composition
• Aggregation is a kind of association that represents a
whole-part relationship
- The implication is that if the whole is created or
deleted, the parts must also be created or deleted at the
same time.
Key Points
• The class diagram is the main “internal” view
- The focus is on static structure, things about the
business policy/business process that should
(effectively) always be true
• A Class is the descriptor for a set of objects with similar
structure, behavior, and relationships
• An Attribute is a single, named fragment of the persistent
state
• An Association exists when some number of objects are
connected (linked) in some significant manner and it is
necessary to remember that connection
• An Association Role indicates the role (purpose) that the
class plays in the association
• Multiplicity describes the rules about the number of
objects in each class that may or may not be linked
• Aggregation is a kind of association that represents a
whole-part relationship
- Composition is like aggregation with the added
constraint that the part may be the part of exactly one
whole
• Associations may take on the characteristics of a class