03 1-UseCaseAnalysis
03 1-UseCaseAnalysis
BA Software
Hardware
Equipments Architecture
Network
Detailed
1 2
3 4
:A
Software :B a1(5)
+a1(int) behavior
class B { class A { /operation
A a = new A(); - attr1;
Component - attr2;
+b(){ - attr3;
a.a1(5); - attr4;
}
+a1(int i){
sub-
} //tính tiền trong ví
component
method //tính tiền trong tài khoản…
//trả về tổng số tiền
}
3 4
1
5 6
Analysis and Design Overview Analysis and Design Are Not Top-Down or Bottom-Up
Analysis and Design
Top
Design Model Down Subsystems
Use-Case Model Analysis and
Design
5 6
Content
1. Overview
ITSS SOFTWARE DEVELOPMENT/SOFTWARE DESIGN AND CONSTRUCTION
2. Analysis classes
3. USE CASE ANALYSIS
3. Distribute Use-Case Behavior to
Nguyen Thi Thu Trang Classes
[email protected] 4. Analysis class diagram
7 8
2
9
software requirements
• Main items
Use case
Supplementary
• a top-level structure of the software and the software Analysis
Specifications Analysis Model
components which constructs the software
• a top-level design for the interfaces external to the
software and between the software components
• a top-level design for the database
Use-Case Model Analysis Classes
9 10
11 12
1. Overview
2. Analysis classes
3. Distribute Use-Case Behavior to
Classes
• The system • The system retrieves
4. Analysis class diagram
displays a list and displays a list of
of courses. current courses from
the course catalog
legacy database.
11 12
3
13 14
create()
Operations save() Use Cases Analysis Design Source Exec
delete()
change()
Classes Elements Code
Use-Case Analysis
13 14
15 16
<<control>> <<boundary>>
System
Use-case
boundary
behavior
coordination <<entity>>
System
information
15 16
4
17 18
17 18
19 20
19 20
5
21 22
Business-Domain
Use Case Model
<<entity>> <<entity>>
Glossary
Store and manage information in the system.
Environment independent.
21 22
23 24
23 24
6
25 26
<<entity>> <<entity>>
25 26
27 28
27 28
7
29 30
1. Overview
Use-Case Model
Customer Place order 2. Analysis classes
3. Distribute Use-Case Behavior to
Analysis Model
Classes
4. Analysis class diagram
29 30
31 32
Use Case
Class Diagrams
31 32
8
33 34
33 34
35 36
35 36
9
37 38
Interaction Overview
Communication Diagrams
Diagrams
37 38
39 40
Execution
Event Occurrence 1.1: PerformAnother
Responsibility
Occurrence
Hierarchical Message
Numbering
Sequence Diagram ref
Interaction Occurrence
39 40
10
41 @NGUYỄN Thị Thu Trang, [email protected] 42
message
Sequence Diagram Contents: Messages
a:A
a1(5)
:B :RegisterForCoursesForm :RegistrationController SWTSU Catalog :
CourseCatalogSystem
: Student : Course Catalog
What can a do?
+a1(int)
+a2() behavior 1: create schedule( )
class B { class A { /operation
A a = new A();
- attr1;
+b(){ - attr2; 2: get course offerings( )
a.a1(5); - attr3; 3: get course offerings(for Semester)
} - attr4;
4: get course offerings( )
}
+a1(int i){ 5: display course offerings( )
//tính tiền trong ví
method
//trả về tổng số tiền 6: display blank schedule( )
Message
}
= implementation of Reflexive
}
operation/behavior Messages
How can a do?
41 42
@NGUYỄN Thị Thu Trang, [email protected] 43 @NGUYỄN Thị Thu Trang, [email protected] 44
• Why sending messages? • Better responsiveness and reduces the temporal coupling but is harder
to debug.
• E.g. in multithreaded applications and in message-oriented middleware.
:CourseRegistrationController :SubjectInfo
: SubjectInfo
SubjectInfo
getSubjectPrerequisites()
getSubjectPrerequisites()
43 44
11
45 46
Communication Diagrams
45 46
47 48
:Client :Supplier
PerformResponsibility
Message
47 48
12
49 50
One Interaction Diagram May Be Not 3.2.3. Sequence and Communication Diagram
Good Enough Comparison
Basic Flow • Similarities
Alternate Flow 1 Alternate Flow 2 Alternate Flow 3
• Semantically equivalent
• Can convert one diagram to the other without losing any
AF3 information
AF1 • Model the dynamic aspects of a system
AF2 • Model a use-case scenario
Alternate Flow 4 Alternate Flow 5 Alternate Flow n
49 50
51 52
51 52
13
53 54
Interaction Diagram
Link
:Client :Supplier
Client Supplier
// PerformResponsibility
Class Diagram
Client 0..* 0..* Supplier
Class Diagram
PerformResponsibility()
Supplier
Association
// PerformResponsibility
Relationship for every link!
53 54
55 56
55 56
14
57 58
57 58
15