Project Life Cycle  «Prev  Next»
Lesson 7Includes stereotype
Objective Identify and Model the Includes Stereotype.

Identify and Model the Includes Stereotype

Most systems have a certain amount of behavior used in a number of places throughout the system. In software, these behaviors often appear as common subroutines or classes. At the use case level, you can avoid rewriting the same flow events multiple times by separating the flow into its own use case. The new use case may then be invoked by other use cases whenever that flow of events is needed. Other use cases may simply “include” the new use case in their own flow of events. This ensures consistency and simplifies the flow events in calling the use case. To include the new use case, use the keyword include and the use case name at the point in the flow of events where it needs to be used.

Text 1
1) Original use case for the automated banking include basic functions of deposit
Text 2
2) Separate out the shared flow of events and create a new use case called Contact Bank.
Text 3
3) Add a dependency arrow from Withdraw Funds to Contact Bank.
Text 4
4) Add a dependency arrow from Deposit Funds
Text 5
5) Add a dependency arrow from inquire on Account

Includes Stereotype

Wait until Use Case Diagram is Complete

As a rule of thumb, wait until the use case diagram is reasonably complete before refining it with the Include stereotype. If you are not careful, you can easily fall into a functional decomposition of the system instead of a use case model. Functional decomposition describes a system in increasing levels of detail. Each level goes deeper into the inner workings of the application. This sabotages the scope of the project initiation phase and sends you into analysis and design much too early in the project. Use the include convention to simplify your model and remove redundancies. Do not use it to describe subfunctions or implementations.

Include Dependency - Exercise

Click the Exercise link below to refine the course project use case diagram with the Includes dependency stereotype.
Include Dependency - Exercise