0% found this document useful (0 votes)
29 views33 pages

Lec4 Se Uml

This document discusses the Unified Modeling Language (UML) and provides information on important UML diagrams. It introduces UML and explains that there are different types of UML diagrams that model a system from external, interaction, structural, and behavioral perspectives. The document focuses on five key diagram types: use case diagrams model interactions between a system and external actors; sequence diagrams show the order of interactions in a use case; and class diagrams model object classes and relationships. It provides examples and explanations of use case, sequence, and class diagrams.

Uploaded by

jfzaki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views33 pages

Lec4 Se Uml

This document discusses the Unified Modeling Language (UML) and provides information on important UML diagrams. It introduces UML and explains that there are different types of UML diagrams that model a system from external, interaction, structural, and behavioral perspectives. The document focuses on five key diagram types: use case diagrams model interactions between a system and external actors; sequence diagrams show the order of interactions in a use case; and class diagrams model object classes and relationships. It provides examples and explanations of use case, sequence, and class diagrams.

Uploaded by

jfzaki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

CSEN406

SOFTWARE
ENGINEERING
UNIFIED
MODELING
LANGUAGE
TABLE OF CONTENTS

01 UML

02 DIAGRAMS STRUCTURE

03 MOST IMPORTANT
INTRODUCTION

What is UML?

Unified Modeling Language.

V2.5 at the time of this lecture.

Dr. JOHN ZAKI 3


DIFFERENT MODELS CATEGORIZATION
1. EXTERNAL PERSPECTIVE: model the context of the system environment

2. INTERACTION PERSPECTIVE: model the interaction between the system and the

environment or between the system components.

3. STRUCTURAL PERSPECTIVE: model the organization of the system of the

structure of the data

4. BEHAVIORAL PERSPECTIVE: model the dynamic behavior of the system and

how it responds to events.

Dr. JOHN ZAKI 4


CLASS DIAGRAM

COMPONENT
DIAGRAM

OBJECT
DIAGRAM
STRUCTURE

DEPLOYMENT
DIAGRAM

PACKAGE
DIGAGRAM

ACITIVITY
Dr. JOHN ZAKI
DIAGRAM

INTERACTION
UML DIAGRAMS

DIAGRAM

USE CASE
DIAGRAM

STATE MACHINE
BEHAVIOR

SEQUENCE
DIAGRAM
5

COMMUNICATIO
N DIAGRAM
MOST IMPORTANT
1. USE CASE DIAGRAM: Show the interactions between a system and its
environment
2. SEQUENCE DIAGRAM: show the interactions between actors and
system and between system components.
3. CLASS DIAGRAM: show the object classes in the system and the
associations between those classes
4. STATE DIAGRAM: show how the system interacts to internal and
external events
5. ACTIVITY DIAGRAM: show the activities involved in a process or in
data processing.
Dr. JOHN ZAKI 6
USE CASE
DIAGRAM
Dr. JOHN ZAKI 7
USE CASE DIAGRAMS
MODEL INTERACTIONS BETWEEN SYSTEM & EXTERNAL
01 ACTORS

02 VISUALIZE FUNCTIONAL REQUIREMENTS OF A SYSTEM

03 SYSTEM, ACTORS, RELATIONSHIPS, USE CASES

04 ALL USE CASES, OR GROUP OF USE CASES

Dr. JOHN ZAKI 8


HOW

SYSTEMS ACTORS

USE CASE RELATIONSHIPS


HOW
SYSTEM

USE CASE

ACTOR
RELATIONSHIPS ACTOR
HOW – SYSTEM
System name
A SYSTEM IS ANYTHING WE ARE ACTUALLY DEVELOPING.

A website, or mobile app

A business process

A software component

…etc

Dr. JOHN ZAKI 11


HOW – ACTOR

ANYTHING OR ANYONE INTERACTING WITH THE SYSTEM.

PRIMARY ACTOR: Initiates the interaction (on the left)


SECONDARY ACTOR: Reactive to the system (on the right)

EX: A person, another system, a device, an organization..etc

MUST BE PLACED OUTSIDE THE SYSTEM


MUST BE CATEGORICAL NOT NAMED

CUSTOMER JOHN

Dr. JOHN ZAKI 12


HOW – USE CASE

REPRESENTS AN ACTION OR SCENARIO OF A TASK WITHIN THE


SYSTEM.

INSIDE THE RECTANGLE OF THE SYSTEM

Dr. JOHN ZAKI 13


HOW – RELATIONSHIPS
ASSOCIATION RELATIONSHIP: Basic communication

INCLUDE: not initiated by an actor, every time a base use case is


executed, the include use case is also executed.
Draw a dashed arrow pointing towards the included use case.
Write include on the arrow.

RELATIONSHIPS EXTEND: not initiated by an actor, when a base use case is


executed, the extend use case CAN HAPPEN SOMETIMES.
Draw a dashed arrow pointing towards the base use case.

GENERALIZATION(inheritance): parent-child use case. Each


child will have some of the parent characteristics but will also
have its own characteristics.

Dr. JOHN ZAKI 14


CASE STUDY - INSTAPAY
You are required to design a mobile application
similar to INSTAPAY where the customer can do
basic operations such as login, check balance,
make a transfer, or pay his bills.

Use (USE-CASE-DIAGRAM) to design the app


flow for your development team. Show examples
of different relationships.

Dr. JOHN ZAKI 15


BANKING APP - INSTAPAY

Built using Lucid chart

Dr. JOHN ZAKI 16


WHAT ARE
EXTENSION
POINTS?
SEQUENCE
DIAGRAM
Dr. JOHN ZAKI 19
SEQUENCE DIAGRAMS

01 MODEL INTERACTIONS BETWEEN SYSTEM COMPONENTS

02 SHOWS SEQUENCE (ORDER) OF INTERACTIONS IN A USE CASE

03 ACTORS, LIFELINE, MESSAGES

04 FLOW OF EVENTS IN A USE CASE, MESSAGE FLOW OF THE USE CASE

Dr. JOHN ZAKI 20


HOW – COMMON COMPONENTS SYMBOLS
object OBJECT: a class or object showing how the object will behave in the system

ACTIVATION BOX: time needed for an object to complete a task

ACTORS: interacts with the system


HOW - COMMON COMPONENTS SYMBOLS
object
LIFELINE: time as it passes downward

LOOP: represent circumstances life if/then scenarios

ALTERNATIVE: options between two or more message


sequences (alternatives)
HOW – COMMON MESSAGE SYMBOLS
SYNCHRONOUS MESSAGE: when sender must wait for response to a
message before it continues. Both call and reply are shown

ASYNCHRONOUS MESSAGE: doesn’t wait for a response before the sender


continues. Only call should be included

ASYNCHRONOUS RETURN MESSAGE: the response (reply) to a message

<<create>>
CREATE MESSAGE: creating a new object.

DELETE /DESTROY MESSAGE: destroy an object


BANKING
APP

Perform the alternative if no


sufficient fund is available

Dr. JOHN ZAKI 24


CLASS
DIAGRAM
Dr. JOHN ZAKI 25
CLASS DIAGRAM
01 USED WHEN DEVELOPING OOP SYSTEM

02 SHOWS CLASSES AND ASSOCIATIONS BETWEEN CLASSES

03 CLASS, ATTRIBUTES, METHODS, RELATIONSHIPS

04 SHOWS # OF OBJECTS IN ASSOCIATION (1:1, 1…N, 1…*)

05 GENERALIZATION, AGGREGATION

Dr. JOHN ZAKI 26


CLASS
Class: is a template for objects
Ex. Animals class, doctors class, customers class..etc

Attribute: are properties/fields, variables of each instance of that


class. Starts with visibility (-, +, #)
Ex. Name, ID, Age

Method: behavior features of the class. The operations or functions.


Visibility:

- private: can be accessed by its class only.


+ public: can be accessed by other classes or subclasses
# protected: can be accessed by the same class or subclasses
(extend classes)
~ package/default: accessed by classes in the same package.

Attributes are often private or protected


Methods are often public

Dr. JOHN ZAKI 27


INHERITANCE

Inheritance: parent-child relationship

Have some characteristics of the parent but


also have their own characteristics.

Connected as subclasses to the parent with


open arrow

User class is abstract, instantiate the children


or objects of the class.

Dr. JOHN ZAKI 28


AGGREGATION & COMPOSITION
AGGREGATION COMPOSITION

Dr. JOHN ZAKI 29


MULTIPLICITY

Allow a numerical constraint


on the relationship

1. Zero to one
2. Specific number
3. Zero to many
4. One to many
5. Specific number range

Dr. JOHN ZAKI 30


EXAMPLE

Dr. JOHN ZAKI 31


RESEARCH
ACTIVITY DIAGRAM &
STATE DIAGRAM
SUMMARY

01 UML TYPES

02 MOST IMPORTANT 5 DIAGRAMS

03 USE CASE, SEQUENCE DIAGRAM, CLASS DIAGRAM

Dr. JOHN ZAKI 33


THANK
YOU
Dr. JOHN ZAKI 34

You might also like