Use case map: It is mainly used to describe the relationship between system behavior and various functions. It is a diagram that describes the relationship between participants and use cases and use cases
element:
-
Use examples (named by phrase)
-
participant (noun phrase)
-
association (verb phrases)
Generally connected directly with straight lines
-
system boundary
Generally use rectangular box
Participants: Participants are the startups of the use case, which can be human or other external systems.
In the ordering system:
- System name: COS
- Participants: Patron, Admin, Deliverer
- Use case: production order, login system, registered account number
time -sequential chart:
Election:
-
object
The
object is represented by a rectangular box. Name also objects, Type is the type of object. The inside is used below the drawing line. -
Lifeline
Lifeline: It is represented by a vertical dotted line.Lifeline represents the life period of an object during the interaction.
-
Activity strip
Activity strip: The execution status of an active activityNote: On the life line, it is not necessary to use activity strips to represent the implementation of the execution. In addition, in the order map with a wide variety of behaviors, the activity strip also makes the icon more complicated. Don’t use activity bar
-
Message
* Message: The behavior of the object also becomes a message, and the interaction between the behavior between the objects can also be regarded as the message between the objects
Realized.* Generally, when one object calls the behavior in another object, it will complete the message of the message. example: One message in the figure. Among them, M1 and M2 are parameters passed. A complete message: d = get (ID1: itemid, id2: itemid): item Among them, the news name: get Message parameters: ID1, ID2, the parameter is ITEM type Return value: ITEM, return to D that is stored in the call object
-
control flow
Among them, the type is expressed in the upper left corner, [Condition condition]
Alt: Condition control
loop: circular condition
In the login system:
Class diagram: It is a model of class, which is a method of using icons and text annotation descriptions and classification between classes
element:
- Class name (noun phrase, the beginning of each word)
- attribute (noun phrase, the first letter of the first word, the uppercase later)
- Method (Moving a phrase, the first letter of the first word, the uppercase later)
- Visible (Public:+; Private: -; Protected:#)
- Data type (variable name: type)
-
association: indicates that one object has another object (the relationship between HAS A)
code can be expressed as:
class A{ private: B object; }; class B{ private: A object2; };
-
dependencies: one class uses the method of another class or a class to use the attributes and methods defined by other classes
dependence is the relationship between two things, one of which (service) changes will affect the other Things (customer service). For two class A and B, class A depends on class B, class B is not a member variable of a class A, generally It is a local variable of a function in A.
icon:
code can be expressed as:class A{ public: void doX(B argument){ }; B doY(){ //dosomething return B; } };
-
Inheritance/implementation
-
combination/aggregation
Example: