Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Static Modeling/Dynamic

Modeling
LECTURE – 15
by Vishvajit Bakrola
Generalization/Specialization
• In practice, Some classes are similar but not
identical.
• They have some attributes in common and
others that are different.
• In a generalization/specialization
hierarchy, common attributes are abstracted
into a generalized class, which is referred to as a
superclass.
Continue…
• The different attributes are properties of the
specialized class, which is referred to as a
subclass.
• There is an Is a relationship between the
subclass and the superclass.
Continue…

Saving Account Is an Account


CheckingAccount Is an Account

[Figure 1: Generalization/Specialization Hierarchy]


Continue…

[Figure 2: Discriminator in Generalization/Specialization]


Constraints
• A constraint specifies a condition or restriction
that must be true.
• A constraint is expressed in any textual
language.
• Though, UML provides dedicated constraint
language, known as Object Constraint Language
(OCL), which is optional to use.
Continue…
• In the case of banking example, we can state the
constraint as – There should not be negative
account balance.

[Figure 3: Example of Constraint]


Dynamic Modeling
• In the dynamic view of the system we will
consider:
▫ Control
▫ Sequencing
• Within an object control and sequence view
will be presented by Finite State Machines.
• Between objects control and sequence view
will be presented through analysis of object
interactions.
Object Interaction Modeling
• The objects realized from use case modeling and
cooperate with each other are considered in
object interaction modeling.
• These objects are depicted on either,
▫ UML communication diagram
▫ UML sequence diagram
Communication Diagrams
• A communication diagram is a UML
interaction diagram that depicts a dynamic view
of a group of objects interacting with each other.
• It also presents the sequence of message passed
amongst objects.
• During analysis modeling, a communication
diagram is developed for each use case; only
objects that participate in the use case are
depicted.
Continue…
• the sequence in which the objects participate in
each use case is depicted by means of message
sequence numbers.
• Communication diagram emphasis on message
exchanged in chronological orders between
objects.
Continue…

[Figure 4: Skeleton of communication diagram]


Continue…

[Figure 5: A process to add event in calendar]


Continue…

[Figure 6: A communication diagram


for view alarm use case]
Sequence Diagram
• The interaction among objects can also be shown
on a sequence diagram, which shows object
interactions arranged in time sequence.
• A sequence diagram shows the objects
participating in the interaction and the sequence
in which messages are sent.
Continue…

[Figure 7: A sequence diagram of view alarm use case]


Continue…

[Figure 8: A sequence diagram of library management system]


References
• (Book) Hassan Gomaa - “Software Modeling and Design” –
Cambridge University Press
• (Book) Martin Fowler and Scott, "UML Distilled", Addison-Wesley
• (Book) The Timeless Way of Building by Christopher Alexander,
1979
• (Book) Design Patterns by Gamma, Helms, Johnson and Vlissides,
1995
• https://www.lucidchart.com/pages/uml-communication-diagram

You might also like