This is the 5th day of my participation in the August More Text Challenge

Why do requirements analysis?

In order to facilitate communication with customers and planners, documents should be used to show their understanding of customer needs, so as not to make mistakes and not to produce what customers or planners need. In terms of development cost, priority and other aspects, we should figure out what problems users need to solve, and comprehensively understand, dig and analyze the real and accurate needs of users from aspects such as those provided by users and those not provided by users but potentially existing

Use case diagram

What scenarios are use-case diagrams used in

Describe system functionality from the customer’s point of view and use it in requirements analysis documents

Two, constituent elements

Participant: The person or thing that uses the system, represented by a humanoid icon

Use case: represents a complete function of the system, represented by an ellipse

Relationships: Define relationships between use cases, including generalization, extension, and inclusion

3. Generalization

Represents different technical implementations of the same business purpose (parent use case) (each child use case). Triangular arrows point from child use case to parent use case. For example, payment includes installment payment, Alipay payment, loan support, etc., but can also be used to indicate that there are more use cases based on one participant.

Fourth, the difference between extension and inclusion

Include: A use case can include behavior that other use cases have and treat its included use cases as part of its own behavior, extending the included use cases with dotted arrows and include: occasionally performing another function while completing a function, extending the included use cases with virtual arrows and extend.

The class diagram

The main elements of the class diagram

Classes, interfaces, relationships

The main elements of the class

Class name, attributes, and methods

Public types are represented by +, private by -, and protection by #

Corresponding to TypeScript public private protected

Iii. What are the relationships of class diagrams

  1. Generalization: Class to class, interface to interface inheritance, such as circle from shape class, with solid line hollow arrow pointing to the parent class

  2. Implementation relationship: The implementation relationship between a class and an interface, with a dashed hollow arrow pointing to the parent class

  3. Dependency: One system relies on the services of another, such as bicycles inflated by pump classes, with dotted arrows pointing to the dependent classes, without a pump for a particular bike

  4. Association: There are fixed correspondences, such as owner and bike, company and employee, etc., with solid arrows pointing to the associated class.

    • Name of an association: describes the nature of the relationship and is a phrasal verb indicating that the source object is performing an action on the target object
    • Relational roles: The responsibilities that one class performs to another. Role names are nouns or name phrases
    • Multiplicity of association relations: how many objects can participate in the association, 1 represents 1 object, 1.. N means 1 to n objects, and * means many objects

  5. Aggregation relationship: the relationship between the whole and the parts. The two classes are at different levels, one representing the whole and the other representing the parts. For example, a car is composed of tires and other parts, which are represented by hollow diamond arrows, where the diamond points to the whole and the arrow points to the parts

  1. Portfolio relationships: The life cycle of parts depends on the whole, such as companies and departments, represented by solid diamond arrows, where diamonds point to the whole and arrows to the parts

4. The difference between association, aggregation and combination

First of all, combination and aggregation are a kind of association relation. The two classes of association belong to the same level, while aggregation and combination are different levels, which are the relationship between whole and part. In addition, the life cycle of part in combination relation depends on the whole. Associations are represented differently, with solid line arrows pointing to the associated class, aggregations are represented with hollow diamond arrows pointing to the whole and the arrows to the parts, and combinations are represented with solid diamond arrows pointing to the whole and the arrows to the parts.

Sequence diagram

A,

Describes the chronological order in which messages are passed between objects, that is, the sequence of actions in the example. The vertical axis is the time axis, and the horizontal axis represents the independent objects in the collaboration

Two, constituent elements

  • object
  • The lifeline
  • The message
  • The activation
  • Object creation and destruction (X)
  • Combination fragment: – Choice (ALT) A mutually exclusive selection between two or more sequences of messages, equivalent to if else, in which a criticality is set to indicate the condition under which the fragment can be run. – the Opt option contains a sequence that may or may not occur, such as retrieving albums, notifications, tweets, etc. Dynamic data is determined depending on whether the configuration should be used. – The Loop segment repeats a certain number of times. Conditional parallelism (Par) that can indicate fragment repetition in criticality can be processed in parallel, and events in the fragment can be interleaved. For example, the requests for initiating albums, notifications and other interfaces are independent of each other and can be parallel – Break

Third, the difference between option and choice

Options indicate that they may or may not occur, and are generally used for scenarios with only one IF and for scenarios with multiple ifs or else

Activity Diagram (Flow chart)

A,

Describes the system’s activities, decision points, and branches

2. Component elements of the activity diagram

  • Action state, rounded rectangle
  • Branches and merges, hollow rhombus, branches include an inbound transition and two outbound transitions with conditions
  • Forks and converges. Forks are used to describe concurrent threads, shown in bold lines
  • Swimming lanes: Which activities are performed by which objects