Article Consultation Solution Tool Course Member  
 
 
 
     
   
UML Diagram: Use case diagram
 
Zu Tao ,Pitaya System Engineering
Views    2020-2-10
 

 

UML is a modeling specification in the software industry, which can establish a requirement model, a design model, an implementation model, and a test model for software projects, because UML has accurate modeling semantics and can be effectively integrated between various models, so it can be simulated and verified based on the model, so that the design has complete forward-looking capabilities.

The latest UML specification is 2.5, which has 13 types of diagrams, divided into 2 categories: static structure diagrams and dynamic behavior diagrams. UML is more professional and abstract to learn because of the accuracy of modeling, here is a special snake game as an example to explain the 13 kinds of UML diagrams, as shown in the following figure:

UML Diagram 1: Use case diagram

Why do you need use case diagram modeling

The use case diagram actually comes from the scene description in the film field, and it is an effective way for the director to tell the actor about the movie script.

It was later referenced by Ivar, the founder of UML, as a diagram to describe the user's needs.

A use case diagram describes what capabilities a system has from the user's perspective.

The user uses actor elements to represent

The user uses usecase to describe the usage scenario of the system.,

What are the benefits of a use case diagram describing requirements?

This way the description of the functional requirements is in line with the user's perspective, and the user is easy to understand and easy to participate in.

What is there in the use case diagram

Any UML diagram has semantics, elements, relationships, and uses, and the following is a list of use case diagrams:

Semanteme Describe the scenario in which the user uses the system
Element Actor: This can be an operator, an external system, an external device Time.
Use case: A scenario description of the interaction between the actor and the system.
Relationship Between Roles: Generalization Relationships ( generalization)
Between use cases: dependency, extend, generalization
Use Describe the functional requirements through the scenarios in which the user uses the system

 

Legend: A diagram of the use case

In order to make the reader see more vividly, here is a legend to introduce the use case diagram, and the following is the use case diagram of the snake game.

Use Case Diagram Description:

Below is a diagram illustration of the use case for the game of Snake

The usecase of the user "player" is "set game" and "play game"

  • There are two ways to play Set Game: Set Rate and 《set size》
  • "Play Game" includes "Eat Food", and it is also possible 《save game》

Each use case should be described in detail, as shown below in the Play Game use case

The name of the use case play game
Preconditions The game starts and the initialization is complete.
Elementary Stream 1.Player starts the game,
2.Game initializes the map,
3.Map appears on the food,
4.A snake climbs into the map,
5.Snake if it encounters food, eats it, adds 10 points,
6.If it encounters a wall, die, game over.
Postcondition Displays the number of points at the end of the game
Alternate flows

In basic streams 3-6, if the player wants Exit the game,

   the system asks if you want to save the game, if the player chooses to save,
       the game is saved, and you can continue the next time you start the game

Postcondition The current progress of the game is saved, and you can continue next time.
Abnormal flows In Elementary Flow 2, the game records logs for post-mortem analysis.
In basic streams 3-6, if the game exits abnormally, a log is recorded for post-mortem analysis.
Postcondition The current progress of the game is saved, and you can continue next time.
Non-functional requirements Performance Requirements:
  • The snake crawls one step per second,
  • Updating the timing every second,
  • Understand and update your points after eating food.
Reliability requirements: The game should ensure basic running ability, and there will be no freezes or abnormal exits.
Expansion Requirements:
  • Interface: Support to change the map background, snake color.
  • Data: You can set the width of the map, the width of the snake.
  • Operating Environment: Multiple operating systems should be supported, including: windows, Android, ios

 

Note: The model in this paper is modeled by the modeling tool EA.

 


UML Diagram Series:

1.UML Overview
2.Use Case Diagram
3.Activity Diagram
4.Class Diagram
5.Object Diagram
6.Sequence Diagram
7.Interpretation of the Mapping Relationship between Class Diagram and Code (C++)

 

Postscript

I hope you have benefited from reading this.

If you are willing to share your experience, please submit it to us.

If you are interested in our training, consulting and tools:

  • Course: Analytical design based on UML and EA  
  • Course: MBSE (Model-Based Systems Engineering)  
  • Course: Model-Based Requirements Management) Methods and Practices
  • Course: System Design and Modeling Based on SysML and EA
  • Course: Enterprise Architecture Modeling
  • Course: System Architecture Modeling Methods and Cases
  • Course: Domain-Driven Modeling and Design
  • Course: Model-Based Design
  • Course: Business Modeling and Business Analysis
  • Modeling tool: EA
  • Model-based requirements management tool: iSpace
  • Consulting Solution: MBSE (Model-Based Systems Engineering)
  • Consulting Solution: Model-Driven Development Based on UML
  • Welcome to contact us: umlooo@hotmail.com

       
    Views  
     
    Related Articles

    UML Overview
    UML Diagram: Use Case Diagram
    UML Diagram: Activity Diagram
    UML diagram: class diagram
    UML Diagram: Object Diagram
    UML Diagram: sequence diagram
     
    Related Courses

    MBSE (Model-based Systems Engineering)
    System analysis and design based on UML
    Business Modeling & Business Analysis
    System design and modeling SysML EA
    Model-based requirements management
    Business Modeling &; Domain-Driven
     
    Related Tool

    MBSE Platform
    Modeling Tools EA
    Requirements Management
    Automatic modeling
    Multi-level simulation -Sys Simulator
    Code Engineer

    Tool News
    June 2024 EA v17.0 Beta release
    November 2022 EA v16.1 release notes
    November 2022 EA v16.1 official release
    July 2022 EA v16.05 release notes
    April 2022 EA16.0 official release
     
    Latest Article
    UML Overview
    UML Diagram: Use Case Diagram
    UML Diagram: Activity Diagram
    UML diagram: class diagram
    UML Diagram: Object Diagram
    UML Diagram: sequence diagram
    Specification changes from UML 2.4 to UML 2.5
    DDS models and modeling tools
    More...   
    MBSE Tool
    MBSE Platform
    Modeling Tools EA
    Requirements Management
    Automatic modeling
    Multi-level simulation -Sys Simulator
    Code Engineer
    DocGenerator
    Model Checker
    R&D management
    TestDriver
    Model Based Quality Manager (inspector)
    More...   
    Successful Case
    Gac Research Institute SysML+EA+ Software
    Modeling tools EA, WebEA, and learning
    China Automotive Intelligence modeling tools EA...
    Ekatong MBSE tool chain consulting
    Avic UAV MBSE tool chain
    Geely Auto buys EA tools
    Huaco Auto parts buy EA tools
    Dongfeng LAN Map Auto purchase EA tools