<<include>>, <<extend>> and alternate courses of events

<<include>> can be used when we find that a sub-procedure (e.g., Payment) of a use case (e.g., Process Sale) is common across multiple use cases and is essential to the use case in question (i.e., Process Sale). However, it can also be used  when the sub-procedure is considered to be important.

Example of <<include>>: We may use <<include>> to reorganize a use case to stand out any important concepts. For instance, in the lecture note, we know that to process sales, payments are essential (otherwise, it is a gift rather than a purchase). Since payment is so important for the application (which, in our case, is the Point-Of-Sales system) and we judge the 'payment' is not merely a simple procedure, we therefore may consider to extract "payment" out from "Process sales" by using <<include>>.  Note that, in the above reasoning, there is no concern on whether "payment" is  common across multiple use cases or not.

 
 
<<extend>> and alternate course of events: they serve different purposes. If a use case is an extended from another use case only if these two use cases are of different types. We use alternate courses if we find that there are just different scenarios to handle the same kind of action.
 
Example: we may have "Payment" being an extended use case of "Purchase Sale". However, we cannot have "Credit Card Payment" being an extended use case of "Payment". It is because, basically, "Credit Card Payment" and "Payment" refer to the same kind of actions (i.e., "Payment" in general).
 
Example:  Circumstances to use alternate cases is pretty much like the following: While you write a program, to handle a situation, after you have written a few sentence, you discover that the situation should be divided into multiple cases, and each case requiers different steps (i.e., sequences of sentences) to handle. In this circumstance, such different handling methods will be the alternate course of events for the "situation".

 

Selected Tags

Tag Groups

Links

ACM SigSoft
IEEE Software Engineering Online