Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

uml
communitycreator

What is generalization in a use case diagram?

Eman Kashif

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Overview

A use case diagram (UML) is used to summarize the interactions between a system and its users. A use case diagram can be made for a general scenario or multiple scenarios that encapsulate the functioning of the system.

Three kinds of entities are displayed in the use case diagram:

  • The system
  • The actors
  • Use cases

1. System: The product that is developed in question. This is represented by a box that encompasses the use cases.

2. Actors: The users or systems that interact with the main system. An actor can be primary or secondary.

  • Primary actors: These actors initiate use cases and interact with the system. They are usually placed on the left side of the system.
  • Secondary actors: These actors are used by the system but they do not interact with the system on their own. They are displayed on the right side of the system. Actors are represented by figures.

3. Use cases: The functions performed by the actors as they interact with the system. Use cases are represented by ellipses.

Generalization is a relationship between two entities such that one entity (child) inherits the functionality of another entity (parent). It can exist between two actors or two use cases. It is represented by an arrow in the direction of the parent use case or actor.

Example

UML use case diagram

Explanation

In the example above, the actors, supervisor, and student inherit the structure of their parent actor, the user. It means that both the supervisor and the student are types of users.

Similarly, the use case view repository has three children, a display repository list, a display tree, and a display file. The generalization implies that all three of these functions are similar to the parent use case, differing only in the particular entity that they display.

RELATED TAGS

uml
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring