Ch07 Static Modeling
Ch07 Static Modeling
2 / 26
Overview
• The static model
– Addresses the static structural view of a problem,
which does not vary with time
– Describes the static structure of the system being
modeled, which is considered less likely to change
than the functions of the system
– Defines the classes in the system, the attributes of
the classes, the relationships between classes, and
the operations of each class
• Static modeling refers to the modeling process
and the UML class diagram notation is used to
depict the static model
3 / 26
Overview
Objects and Classes
5 / 26
Overview
Static Modeling
6 / 26
Association Between Classes
• An association defines a relationship between two or more
classes, denoting a static, structural relationship between
classes.
– I.e: Employee Works in Department, where Employee and
Department are classes and Works in is an association.
– The classes are nouns, whereas the association is usually a verb or
verb phrase.
• A link is a connection between instances of the classes
(objects) and represents an instance of an association
between classes
– I.e: Jane Works in Manufacturing,
– Jane is an instance of Employee and Manufacturing is an instance of
Department.
– A link can exist between two objects if, and only if, there is an
association between their corresponding classes.
7 / 26
Association Between Classes
UML Notations 1/2
8 / 26
Association Between Classes
UML Notations 2/2
Associations
on a class
diagram
Class
9 / 26 attributes
Association Between Classes
Ternary & Unary Associations
• A ternary association is a three-way association among classes.
• A unary association, also referred to as a self-association, is an
association between an object of one class and another object
in the same class.
10 / 26
Association Between Classes
Association Classes
Relationship
Characteristics
12 / 26
Composition & Aggregation Hierarchies
Composition Relationship
In composition relationship, the part objects are
created, live, and die together with the whole.
The part object can belong to only one whole.
13 / 26
Composition & Aggregation Hierarchies
Aggregation Hierarchy
The aggregation hierarchy is a weaker form of
whole/part relationship.
Part instances can be added to and removed
from the aggregate whole. For this reason:
• Aggregations are likely to be
used to model conceptual
classes rather than physical
classes.
• A part could belong
to more than one
aggregation
14 / 26
Generalization/Specialization Hierarchy
16 / 26
Static Modeling & The UML
• The approach used in COMET is to have a conceptual static model
early in the analysis phase that is used to model and help
understand the problem domain.
• The initial emphasis is on modeling physical classes & entity classes
– Physical classes: classes that have physical characteristics – that
is, they can be seen & touched (users, external systems, timers)
– Entity classes are conceptual data-intensive classes that are
often persistent (long-living).
Example of
constraints on
objects Ordering in classes
association: an
example of constraint
(restriction) on an
association link
17 / 26
Context Modeling
Context modeling explicitly identifies what is inside the
system and what is outside.
• Can be done at the total system (hardware and software) level or
at the software system (software only) level
• Helps to understand the scope of a computer system: what is to
be included inside the system and what is to be left outside the
system
A diagram that explicitly shows the border between the system
(hardware and software), which is treated as a black box, and
the external environment is called a system context diagram
18 / 26
Context Modeling
Software System Context Diagram
19 / 26
Context Modeling
Classes Categorization Using UML Stereotypes
22 / 26
Context Modeling
Modeling External Classes 3/3
23 / 26
Static Modeling of Entity Classes
• Entity classes: store data and provide access to this data
• During static modeling of the problem domain, the COMET
emphasis is on determining the entity classes that are defined
in the problem, their attributes, and their relationships
Entity class
model for
online
shopping
application
24 / 26
Static Modeling of Entity Classes
Modeling Class Attribute
25 / 26