0% found this document useful (0 votes)
26 views39 pages

Presentation 1

Uploaded by

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

Presentation 1

Uploaded by

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

1

12/02/2024
CHAPTER TWO
OVERVIEW OF
UML
2
Outline

 An overview of UML.

 Use Case Diagrams

 Class Diagrams

 Sequence diagrams

 State chart diagrams

12/02/2024
3
UML – Unified modeling language

 UML is a pictorial language used to make software blueprints.

 The UML is a standard graphical design for presenting important analysis and design concepts

 It is used to easily :-
 specifying,

 visualizing,

 Design

 constructing of software systems


12/02/2024
4
Cont..

UML specification defines two major kinds of UML diagram:

 Structure diagrams:-
 show the static structure of the system and its parts on different abstraction and implementation levels and how they are related to
each other.

 The elements in a structure diagram represent the meaningful concepts of a system, and may include abstract, real world and
implementation concepts.

 Behavior diagrams:- show the dynamic behavior of the objects in a system, which can be described as a series of
changes to the system over time
12/02/2024
5
Cont..

12/02/2024
6
UML Diagrams

 Use Case Diagrams


 Class Diagrams
 Sequence Diagrams
 State chart Diagrams

12/02/2024
7
Use Case Diagrams

 It is a dynamic UML diagram used to express behaviour of the system .


 It encapsulates the system's functionality by incorporating use cases, actors, and their
relationships.
 It is simplest representation that shows :-
 the interaction between the system and users
 Is shows the relationship between the user and different use cases.
 A Use Case diagram consists of
 use cases,

 Actors
 system boundary 12/02/2024
8
Actor

 it is some one or something outside the system that interacts with the system.

 An actor is anything that exchanges data with the system.

 An actor can be a user, external hardware, or another system.

 Represented as =>

12/02/2024
9
How to Find Actors

 Which is capable to do the following task can be considered as the actor


 Supply/use/remove information

 Use the functionality.

 Will support/maintain the system.

 The system’s external resources.

 The other systems will need to interact with this one.


12/02/2024
10
Documenting Actor Characteristics

 We should considered the following questions or description

 Brief Description for each actors

 Why the actor is needed?

 What will do the actor in the system?

 Actor characteristics might influence how the system is developed

 The actor's scope of responsibility.


12/02/2024
11
Use case

 A use case is a list of actions or event steps that helps the achieve the goal of the system .
 It is a technique for capturing, modelling and specifying the requirements of a system.
 It is represented by oval circle

12/02/2024
12
How to Find Use Cases

 We can find the use case of the system by analyzing the following pointes
 What are the system tasks for each actor you have identified?

 Does the actor need to be informed about certain occurrences in the system?

 Can all features be performed by the use cases you have identified?

 What information must be modified or created in the system?

12/02/2024
13
System boundary

 It is rectangle diagram representing the boundary between the actors and the system.
 Use Case Diagram(core relationship)
 Association: communication between an actor and a use case; Represented by a solid line.

 Generalization:
 relationship between one general use case and a special use case (used for defining special alternatives)
 Represented by a line with a triangular arrow head toward the parent use case.

12/02/2024
14
Cont.

 Include: a dotted line labeled <<include>> beginning at base use case and ending with an arrows pointing to the
include use case.
 It occurs when a chunk of behavior is similar across more than one use case

<<include>>

 Extend: a dotted line labeled <<extend>> with an arrow toward the base case.
 The extending use case may add behavior to the base use case. The base class declares “extension points”.
<<extend>>
12/02/2024
15
Example: Library management
System

12/02/2024
16
Use Case Diagrams(cont.)

12/02/2024
17
Cont.

 Pay Bill is a parent use case and Bill Insurance is the child use case. (generalization)

 Both Make Appointment and Request Medication include Check Patient Record as a subtask.(include)

 The extension point is written inside the base case

 Pay bill; the extending class Defer payment adds the behavior of this extension point. (extend)

12/02/2024
18
Class diagram

 Used for describing structure and behavior in the use cases

 Provides a conceptual model of the system in terms of entities and their relationships

 Used for requirement capture, end-user interaction

 Detailed class diagrams are used for developers

12/02/2024
19
Class representation

 Each class is represented by a rectangle subdivided into three compartments


 Name

 Attributes

 Operations

 Modifiers are used to indicate visibility of attributes and operations.


 ‘+’ is used to denote Public visibility (everyone)
 ‘#’is used to denote Protected visibility (friends and derived)
 ‘-’is used to denote Private visibility (no one)

12/02/2024
20
An example of Class

12/02/2024
21
OO Relationships

 There are two kinds of Relationships


 Generalization (parent-child relationship)

 In generalization, one element is a specialization of another general component. It may be


substituted for it.
 It is mostly used to represent inheritance

 Association (student enrolls in course)


 It is a structural relationship that represents objects can be associated with another object inside the system

12/02/2024
22
Associations can be further classified as

 Aggregation :- an object of one class can own or access the objects of another
 E.g. A car needs a wheel to function correctly, but a wheel doesn't always need a car.
 Composition:-It is not a standard UML relationship, but it is still used in various applications.
 It is a whole/part relationship.
 If a composite is deleted, all other
parts associated with it are deleted.

12/02/2024
23
OO Relationships: Generalization

12/02/2024
24
OO Relationships: Association

 Represent relationship between instances of classes


 Student enrolls in a course

 Courses have students

 Courses have exams Etc.

 Association has
 Role names (e.g. enrolls)

 Multiplicity (e.g. One course can have many students)


12/02/2024


25
Interaction Diagram

 It is a diagram representation used to describe the interactions among different elements or object

 The purpose of interaction diagrams is to visualize the interactive behavior of the system.

 It shows the flow of messages within a system

12/02/2024
26
Cont.

 The purposes of interaction diagram can be describes as:


 To capture dynamic behavior of a system.

 To describe the message flow in the system.

 To describe structural organization of the objects.

 To describe interaction among objects.

12/02/2024
27
Cont.

 The following factors are to be identified clearly before drawing the interaction diagram:

 Objects taking part in the interaction.

 Message flows among the objects.

 The sequence in which the messages are flowing.


 This interactive behavior is represented in UML by two diagrams known as
 Sequence diagram and
 Collaboration diagram

12/02/2024
28
sequence diagram

 it is a type of interaction diagram it describes how and in what order a group of objects works together.
 it is known as event diagrams or event scenarios
 It is a good way to visualize and validate various runtime scenarios.
 It shows different parts of a system work in a ‘sequence’ to get something done
 It emphasizes on time sequence of messages

12/02/2024
29
Basic Sequence Diagram Notations

 Class Roles or Participants:-


 it describe the way an object will behave in context.

 Use the UML object symbol to illustrate class roles, but don't list object attributes.

 Activation or Execution Occurrence:-it represent the time an object needs to complete a task.

12/02/2024
30
Cont..

 Self Message: A message an object sends to itself, usually shown as a U shaped arrow pointing back to itself.

 Message flow :

12/02/2024
31
Example :-Sequence Diagram(Telephone call)

12/02/2024
32
Sequence Diagrams – Object Life Spans

 Creation
 Create message
 Object life starts at that point
 Activation
 Symbolized by rectangular stripes
 Place on the lifeline where object is activated.
 Deletion
 Placing an ‘X’ on lifeline
 Object’s life ends at that point

12/02/2024
33
State chart Diagrams

 A State chart diagram describes a state machine.

 State machine is machine which defines different states of an object and these states are controlled by external or internal
events

 State chart diagrams are useful to model the reactive systems.

 Reactive systems can be defined as a system that responds to external or internal events.

12/02/2024
34
Cont..

 it describes the flow of control from one state to another state.

 States are defined as a condition in which an object exists and it changes when some event is triggered.

 The most important purpose of State chart diagram is to model lifetime of an object from creation to termination.

 It differ from activity diagram is consist of triggered states.

12/02/2024
35
Cont..

 Why we use state chart diagram ?


 To model the dynamic aspect of a system.
 To model the life time of a reactive system.
 To describe different states of an object during its life time.
 Define a state machine to model the states of an object.

12/02/2024
36
Symbols and notation of state chart diagram

 Start:-Start state symbol signals the first step of a process.

 Transition:-symbol stands for the result of a process


 Decision:-Decision were introduced in UML to support
conditionals in activities.
 State :-State defines current condition of an event or activity.

 End state :-End state symbol stands for the result of a process.

12/02/2024
37
Cont..

Sample of stat chart diagram

12/02/2024
Cont..
38
 E.g. login page

12/02/2024
39

Thank you
12/02/2024

You might also like