Lecture05-DesignModels
Lecture05-DesignModels
Engineering
SPRING 2024-2025
CHAPTER 5 – DESIGN MODELS
Week 10: Lecture 9 & 10
• An external perspective, where you model the context or environment of the system.
• An interaction perspective, where you model the interactions between a system and
its environment, or between the components of a system.
• A structural perspective, where you model the organization of a system or the
structure of the data that is processed by the system.
• A behavioral perspective, where you model the dynamic behavior of the system and
how it responds to events.
• Context diagrams, provides an overview of a system by showing its boundaries, the entities
that interact with it, and the interactions between the system and its external entities.
• Activity diagrams, which show the activities involved in a process or in data processing.
• Use case diagrams, which show the interactions between a system and its environment.
• Sequence diagrams, which show interactions between actors and the system and between
system components.
• Class diagrams, which show the object classes in the system and the associations between
these classes.
• State diagrams, which show how the system reacts to internal and external events
Context Model 1
Chapter 5 System Modeling 15
ATM System Context Diagram
Context Model 2
Chapter 5 System Modeling 16
Test Your Self
• The JazzN!ghts festival in Zurich, an annual jazz event since 1986, is revolutionizing its ticket-selling
approach. Previously exclusive to two events agencies, the festival is embracing a modernized
system. Tickets will now be available through three distinct channels: the traditional agencies, the
festival's website in electronic format, and via collaboration with Swiss railway company SBB. All
channels will share a unified ticket database to prevent duplication in sales. Additionally, the festival
aims to establish a partnership with SBB to offer combined tickets covering festival entry and train
travel at reduced rates across Switzerland. The system will undergo expansion to support multiple
languages—German, English, French, and Italian— catering to a diverse audience. To ensure secure
online transactions, SecurePayment Inc. will manage the online payment service. On-site, attendees
will utilize touch screen terminals for self-check-ins, receiving electronic-chipped bracelets facilitating
cashless purchases of snacks and beverages, an initiative by WristSolutions Inc.
Test Your Self
Process Perspective
Activity Model 1
Document Management System
Activity Model 2
Activity Model 3
Process model of involuntary detention
• Sequence diagrams are part of the UML and are used to model the interactions
between the actors and the objects within a system.
• A sequence diagram shows the sequence of interactions that take place during a
particular use case or use case instance.
• The objects and actors involved are listed along the top of the diagram, with a
dotted line drawn vertically from these.
• Interactions between objects are indicated by annotated arrows.
• Lifeline Notation
• Lifeline Notation
• A lifeline with an entity element represents system data. For
example, in a customer service application, the Customer entity
would manage all data related to a customer.
Symbols of Sequence Diagram (cont.)
• Activation Bars
• The activation bar is the box placed on the lifeline. It is used to
indicate that an object is active (or instantiated) during an
interaction between two objects. The length of the rectangle
indicates the duration of the objects staying active.
Symbols of Sequence Diagram (cont.)
• Synchronous message
• a synchronous message is used when the sender waits for the
receiver to process the message and return before carrying on with
another message.
• Asynchronous message
Symbols of Sequence Diagram (cont.)
• Asynchronous message
• An asynchronous message is used
when the message caller does not
wait for the receiver to process the
message and return before sending
other messages to other objects
within the system. The arrowhead
used to show this type of message
is a line arrow as shown in the
example below.
Symbols of Sequence Diagram (cont.)
• Return message
• A return message is used to
indicate that the message
receiver is done processing the
message and is returning
control over to the message
caller.
Symbols of Sequence Diagram (cont.)
• Participant destruction
message
Symbols of Sequence Diagram (cont.)
• Reflexive message
• When an object sends a
message to itself, it is called
a reflexive message. It is
indicated with a message
arrow that starts and ends at
the same lifeline as shown in
the example below.
Symbols of Sequence Diagram (cont.)
• Alternatives
• The alternative combination
fragment is used when a
choice needs to be made
between two or more
message sequences. It
models the “if then else”
logic.
Symbols of Sequence Diagram
• Alternatives
• The alternative combination
fragment is used when a
choice needs to be made
between two or more
message sequences. It
models the “if then else”
logic.
How to Draw a Sequence Diagram
Class diagrams
0x00FDA610
my_car
0x00FDA610
CLASSES AND OBJECTS
• Each object is an instance of a class
• Each object has a reference to its
class (knows which class it belongs to)
Identity
CLASSIFICATION
B
HOW TO USE INHERITANCE?
• Generic Class ; the data types of one or more of its attributes are
supplied at run-time (at the time that an object of the class is
instantiated).
• This means that the class is parameterized, i.e., the class gets a
parameter which is the name of another type.
CLASS MODEL
• An attribute is a named property of class that describes a value held by each object of that class.
• Attribute name is unique per class.
• Several classes may have the same attribute name.
• A value is a piece of data assigned to an attribute.
MORE ON ATTRIBUTES
OPERATIONS AND METHODS