Software Engineering
Use Case Analysis - RealizationsAgenda
- Analyze a Use Case
- Goals for Use Case Realization
- What Are Use Case Realizations?
- Interactions
- Lifelines and Messages
- Add Course Use Case
- Delete Course Use Case
- Combined Fragments and Operators
- Communication Diagrams
Analyze a Use Case
![](images/fig8-2.png)
- Analysis classes model the static structure of a system, and use case
realizations show how instances of the analysis classes interact to
realize the functionality of the system.
- This is part of the dynamic view of the system.
- Find out which analysis classes interact to realize the
behavior specified by use cases-you may uncover new analysis classes as
you perform use case realization
- Find out what messages instances of these classes need to
send to each other to realize the specified behavior. This tells you
- the key operations your analysis classes need to have
- the key attributes of the analysis classes
- important relationships between analysis classes
- Update your use case model, requirements model, and
analysis classes with the information you get from use case
realization. Keep all models consistent and in step with each other.
- Use case realizations show how classes collaborate to realize system
functionality.
- You turn a use case, which is a specification of functional
requirements, into a class diagram and interaction
diagram, which are a high-level specification of the system.
![](images/fig12-3.png)
Each use case has exactly one use case realization, so instead you add
appropriate elements as listed in the table below.
![](images/table12-1.png)
- Interaction - a unit of behavior of a context classifier
- In use case realization a context classifier is a use case.
- You create one or more interactions to demonstrate how behavior
specified by the use case can be realized by instances of classifiers
(either in in the analysis-analysis classes, or in the design-design
classes) passing messages back and forth.
Add Course Use Case
![](images/fig12-6.png)
![](images/fig12-7.png)
![](images/fig12-8.png)
Interaction diagrams are not verbatim transcriptions of a use case; they
are illustrations of how the use case behavior is realized by analysis
classes.
Delete Course Use Case
![](images/fig12-9.png)
![](images/fig12-10.png)
State Invariants and Constraints
You can show the state of the instances on the lifelines by using state
invariants.
Adding state invariants to a sequence diagrams can be a very useful analysis
technique because it allows you to capture the key states in the lifecycle of
a lifeline.
![](images/fig12-11.png)
Capture the following constraints:
- the order must be paid for in full by a single payment
- the items specified in the order can only be delivered after
payment
- the items are delivered to the customer within 28 days of payment
![](images/fig12-12.png)