Professional Documents
Culture Documents
DEV475 05 UCAnalysis
DEV475 05 UCAnalysis
Mastering Object-Oriented Analysis and Design with UML Module 5: Use-Case Analysis
Use-Case Analysis
Define Components
Glossary
Use-Case Realization
Supplementary Specifications
Use-Case Analysis
Analysis Model
Use-Case Model
4
Analysis Classes
The system retrieves and displays a list of current course offerings from the course catalog legacy database.
Review: Class
An abstraction Describes a group of objects with common:
Properties (attributes) Behavior (operations) Relationships Semantics Class Name
Attributes Operations
Use Case
Use-Case Realization
Sequence Diagrams
Collaboration Diagrams
10
Source Code
Exec
12
<<boundary>>
System information
13
<<entity>>
<<entity>>
Student
RegisterForCoursesForm
CourseCatalogSystem
16
17
Use Case
Glossary
Environment Independent
18
<<entity>>
<<entity>>
CourseOffering
Schedule
Student
21
Use Case
<<entity>>
<<entity>>
RegistrationController
24
Student
RegisterForCoursesForm
CourseCatalogSystem
Student
Schedule
CourseOffering
RegistrationController
25
Collaboration Diagrams
Use-Case Realization
Supplier Object
:Supplier
Object Lifeline
1: PerformResponsibility
Reflexive Message
Focus of Control
30
1: // create schedule( ) 2: // get course offerings( ) Create a new schedule 3: // get course offerings(forSemester) 4: // get course offerings( ) 5: // display course offerings( )
A list of the available course offerings for this semester are displayed A blank schedule is displayed for the students to select offerings
7: // select 4 primary and 2 alternate offerings( ) 8: // create schedule with offerings( ) 9: // create with offerings( ) 10: // add schedule(Schedule)
Sequence Diagram: Register for Courses / Register for Courses - Basic Flow (Submit Schedule)
Supplier Object
Message
32
: RegistrationController
33
34
Sequence Diagrams
Show the explicit sequence of messages Better for visualizing overall flow Better for real-time specifications and for complex scenarios
35
Describe Responsibilities
What are responsibilities? How do I find them?
Interaction Diagram
:Client // PerformResponsibility :Supplier
Class Diagram
Supplier // PerformResponsibility
37
<<entity>> Schedule // commit() // select alternate() // remove offering() // level() // cancel() // get cost() // delete() // submit() // save() // any conflicts?() // create with offerings() // update with new selections()
<<boundary>> RegisterForCoursesForm // display course offerings() // display blank schedule() // update offering selections()
38
39
ClassName
Attribute : Type = InitValue Attribute : Type = InitValue Attribute : Type = InitValue
attribute
41
Finding Attributes
Properties/characteristics of identified classes Information retained by identified classes Nouns that did not become classes
Information whose value is the important thing Information that is uniquely "owned by an object Information that has no behavior
42
43
Finding Relationships
PerformResponsibility
Collaboration Diagram
:Client
:Supplier
Class Diagram
Client
0..*
Supplier
PerformResponsibility()
Association
<<entity>> Student
0..*
45
Association or Aggregation?
If two objects are tightly bound by a whole-part relationship
The relationship is an aggregation.
Car Door
0..2,4
If two objects are usually considered as independent, although they are often linked
The relationship is an association.
Car Door
0..2,4
Role Name
<<entity>> Course
preRequisites
47
Review: Multiplicity
Unspecified Exactly One Zero or More Zero or More One or More Zero or One (optional scalar role) Specified Range Multiple, Disjoint Ranges
48
0..*
<<entity>> Course
49
alternateCourses
<<entity>> Schedule
<<entity>> CourseOffering
<<entity>> Student 1
primaryCourses 0..4
<<entity>> CourseOffering
51
That is why we have a persistence analysis mechanism. We dont know enough yet, so we can bookmark it and come back to it later.
Analysis mechanisms are used during analysis to reduce the complexity of analysis, and to improve its consistency by providing designers with a shorthand representation for complex behavior.
53
54
55
56
Registration Controller
Schedule
CloseRegistration Form
Close Registration
Billing System
Course Offering
Schedule
58
CloseRegistration Form
Design Model
Glossary
Supplementary Specification
Analysis Classes
Use-Case Model
59
(continued)
64
66
Exercise: Review
Compare your Use-Case Realization with the rest of the class
Do the Interaction diagrams carry out the use-case flow of events? Are the stereotypes behaving properly? Is each association supported by a link? Does each association have multiplicity assigned? Have role names been assigned? Do they accurately represent the face the class plays in the relationship?
Payroll System
67