Modeling Tool .: Aim: Prepare Use-Cases and Draw Use-Case Diagram Using Software
Modeling Tool .: Aim: Prepare Use-Cases and Draw Use-Case Diagram Using Software
Modeling Tool .: Aim: Prepare Use-Cases and Draw Use-Case Diagram Using Software
Modeling Tool .
Use-case:
Use cases are used to represent high-level functionalities and how the user
will handle the system. A use case represents a distinct functionality of a
system, a component, a package, or a class. It is denoted by an oval shape
with the name of a use case written inside the oval shape. The notation of a
use case in UML is given below:
Use-case:
Use cases are used to represent high-level functionalities and how the user
will handle the system. A use case represents a distinct functionality of a
system, a component, a package, or a class. It is denoted by an oval shape
with the name of a use case written inside the oval shape. The notation of a
use case in UML is given below:
UML Use Case Notation
Actor:
It is used inside use case diagrams. The actor is an entity that interacts with
the system. A user is the best example of an actor. An actor is an entity that
initiates the use case from outside the scope of a use case. It can be any
element that can trigger an interaction with the use case. One actor can be
associated with multiple use cases in the system. The actor notation in UML is
given below.
After the actors and use cases are enlisted, then you have to explore the
relationship of a particular actor with the use case or a system. One must
identify the total number of ways an actor could interact with the system. A
single actor can interact with multiple use cases at the same time, or it can
interact with numerous use cases simultaneously.
Following rules must be followed while drawing use-case for any system:
They also help identify any internal or external factors that may influence the system and
should be taken into consideration.
They provide a good high level analysis from outside the system. Use case diagrams
specify how the system interacts with actors without worrying about the details of how
that functionality is implemented.
Basic Use Case Diagram Symbols and Notations
System
Draw your system's boundaries using a rectangle that contains use cases. Place actors
outside the system's boundaries.
Use Case
Draw use cases using ovals. Label the ovals with verbs that represent the system's
functions.
Actors
Actors are the users of a system. When one system is the actor of another system, label
the actor system with the actor stereotype.
Relationships
Illustrate relationships between an actor and a use case with a simple line. For
relationships among use cases, use arrows labeled either "uses" or "extends." A "uses"
relationship indicates that one use case is needed by another in order to perform a task.
An "extends" relationship indicates alternative options under a certain use case.
Actors don't have names. They're not "Bob." They represent the role of someone
interacting with the system.
Keep your names short and the size of your use cases consistent for a professional look.
For a detailed implementation of a user's goal use a sequence diagram.
Use Case Diagram Examples
The best way to understand use case diagrams is to look at some examples of use case
diagrams.
Use Case Diagram Guidelines for
Better Use Cases
Updated on: 30 July 2021
A use case diagram mainly consists of actors, use cases and relationships.
More complex larger diagrams can include systems and boundaries. We’ll
discuss the use case diagram guidelines based on objects.
It is important to remember that these are use case diagram guidelines and
not rules. It’s alright to deviate if it improves the overall quality of the diagram.
To get a deep understanding of use case diagrams, check out our use case
diagram tutorial.
Actors
Give meaningful business relevant names for actors – For example,
if your use case interacts with an outside organization it’s much better to
name it with the function rather than the organization name. (Eg: Airline
Company is better than PanAir)
Primary actors should be to the left side of the diagram – This
enables you to quickly highlight the important roles in the system.
Actors model roles (not positions) – In a hotel both the front office
executive and shift manager can make reservations. So something like
“Reservation Agent” should be used for actor name to highlight the role.
External systems are actors – If your use case is send-email and if
interacts with the email management software then the software is an
actor to that particular use case.
Actors don’t interact with other actors – In case actors interact within
a system you need to create a new use case diagram with the system in
the previous diagram represented as an actor.
Place inheriting actors below the parent actor – This is to make it
more readable and to quickly highlight the use cases specific for that
actor.
Use Case Diagram Templates
Use Cases
Names begin with a verb – A use case models an action so the name
should begin with a verb.
Make the name descriptive – This is to give more information for
others who are looking at the diagram. For example “Print Invoice” is
better than “Print”.
Highlight the logical order – For example, if you’re analyzing a bank
customer typical use cases include open account, deposit and withdraw.
Showing them in the logical order makes more sense.
Place included use cases to the right of the invoking use case –
This is done to improve readability and add clarity.
Place inheriting use case below parent use case – Again this is done
to improve the readability of the diagram.
Relationships
Arrow points to the base use case when using <<extend>>
<<extend>> can have optional extension conditions
Arrow points to the included use case when using <<include>>
Both <<extend>> and <<include>> are shown as dashed arrows.
Actor and use case relationship don’t show arrows.
Check out the link to learn more about use case diagram relationship
Systems / Packages
Use them sparingly and only when necessary
Give meaningful and descriptive names to these objects
Although extending use case is optional most of the time it is not a
must. An extending use case can have non-optional behavior as well.
This mostly happens when your modeling complex behaviors.
For example, in an accounting system, one use case might be “Add
Account Ledger Entry”. This might have extending use cases “Add Tax
Ledger Entry” and “Add Payment Ledger Entry”. These are not optional
but depend on the account ledger entry. Also, they have their own
specific behavior to be modeled as a separate use case.
The base use case is incomplete without the included use case.
The included use case is mandatory and not optional.
Lest expand our banking system use case diagram to show include
relationships as well.