04-DynamicAnalysis
04-DynamicAnalysis
Dynamic Analysis
Assoc. Prof. TRAN Minh Triet
Department of Software Engineering
2
Use-Case Realization
Communication
Sequence Diagrams
Diagrams
3
Analysis Classes: A First Step Toward Executables
Use-Case Analysis
4
Find Classes from Use-Case Behavior
5
What Is an Analysis Class?
<<boundary>> <<entity>>
System System
boundary information
<<control>> <<boundary>>
System
Use-case
boundary
behavior
coordination <<entity>>
System
information
6
What Is a Boundary Class?
Environment dependent.
7
The Role of a Boundary Class
<<control>>
<<boundary>> <<boundary>>
Actor 1 Actor 2
<<entity>> <<entity>>
8
Example: Finding Boundary Classes
RegisterForCoursesForm CourseCatalogSystem
9
Guidelines: Boundary Class
10
What Is an Entity Class?
Analysis
class
stereotype
Business-Domain
Use Case Model
Architectural Analysis
Abstractions Glossary
Environment independent.
11
The Role of an Entity Class
<<control>>
<<boundary>> <<boundary>>
Actor 1 Actor 2
<<entity>> <<entity>>
12
Example: Finding Entity Classes
13
Example: Candidate Entity Classes
CourseOffering Schedule
Student
14
What Is a Control Class?
15
The Role of a Control Class
<<control>>
<<boundary>> <<boundary>>
Actor 1 Actor 2
<<entity>> <<entity>>
RegistrationController
17
Example: Summary: Analysis Classes
Use-Case Model
Design Model
CourseOffering RegistrationController
18
Distribute Use-Case Behavior to Classes
Use-Case Realization
Communication
Sequence Diagrams
Diagrams
Use Case
Class Diagrams
19
Guidelines: Allocating Responsibilities to Classes
20
Guidelines: Allocating Responsibilities to Classes
21
Anatomy of Sequence Diagrams
Object Lifeline
Reflexive Message
1: PerformResponsibility
Hierarchical Message
Numbering
ref
Interaction Occurrence
22
Example: Sequence Diagram
1: // create schedule( )
2: // get course offerings( )
Create a new 3: // get course offerings(forSemester)
schedule
4: // get course offerings( )
A blank schedule
is displayed for the 6: // display blank schedule( )
students to select
offerings
23
Anatomy of Communication Diagrams
:Client :Supplier
PerformResponsibility
Message
24
Example: Communication Diagram
: Course Catalog
4: // get course offerings( )
: RegisterForCoursesForm
: CourseCatalogSystem
: RegistrationController
: Student
25
One Interaction Diagram: Not Good Enough
Basic Flow
Alternate Flow 1 Alternate Flow 2 Alternate Flow 3
AF3
AF1
AF2
Alternate Flow 4 Alternate Flow 5 Alternate Flow n
26
Communication Diagrams vs. Sequence Diagrams
27