The relationship between use cases should be difficult to understand when drawing a use case diagram. The relationship between use cases can be divided into three types: Include, extend, and generalization.
First, we will introduce generalization, which is easy to understand. The Generalization relation is an inheritance relation. The subcase inherits all the behaviors, links, and communication relationships of the base case, that is to say, subcases can be used to replace any use case. The typical usage is that the "Payment Order" Use Case can have two subcases: "cash payment" and "credit card payment. The generalization relationship is represented by a hollow arrow in the use case diagram, and the arrow direction refers to the base case.
Include and extend are two confusing relationships. First, let's look at the include relationship. Include is the inclusion relationship. When two or more use cases use the same group of actions, you can extract the same group of actions as an independent sub-use case, shared by multiple base use cases, which is similarCodeDuplicate code is extracted as an independent function call in development. Because the child use cases are extracted, the base use cases are not a complete Use Case. Therefore, the base use cases in the include relationship must be used with the child use cases to be complete, and the child use cases must be executed later. The include relationship is represented by a dotted line with an arrow in the use case diagram (marked online <include>), and the arrow points to the sub-case.
Extend relationships are extensions of base use cases. The biggest difference from include is that the base use case of extend is a complete Use Case, even if no sub-use case is involved, you can also complete a complete function. There will be an extension point in the base use case of extend. The sub-use case will be executed only when the extension point is activated. A typical example is after the query case, there can be an extended export case. The extend relationship is represented by a dotted line with arrows in the use case diagram (online labeling <extend>), and the arrow refers to the base case.