UML Unit 2 Use Case
UML Unit 2 Use Case
The UML stands for Unified modeling language, is a standardized general-purpose visual
modeling language in the field of Software Engineering. It is used for specifying,
visualizing, constructing, and documenting the primary artifacts of the software system.
It helps in designing and characterizing, especially those software systems that
incorporate the concept of Object orientation. It describes the working of both the
software and hardware systems.
Conceptual Modeling
Before moving ahead with the concept of UML, we should first understand the basics of
the conceptual model.
A conceptual model is composed of several interrelated concepts. It makes it easy to
understand the objects and how they interact with each other. This is the first step
before drawing UML diagrams.
Following are some object-oriented concepts that are needed to begin with UML:
o Object: An object is a real world entity. There are many objects present within a
single system. It is a fundamental building block of UML.
o Class: A class is a software blueprint for objects, which means that it defines the
variables and methods common to all the objects of a particular type.
o Abstraction: Abstraction is the process of portraying the essential characteristics
of an object to the users while hiding the irrelevant information. Basically, it is
used to envision the functioning of an object.
o Inheritance: Inheritance is the process of deriving a new class from the existing
ones.
o Polymorphism: It is a mechanism of representing objects having multiple forms
used for different purposes.
o Encapsulation: It binds the data and the object together as a single unit, enabling
tight coupling between them.
Role of UML in OO design
Things
Anything that is a real world entity or object is termed as things. It can be divided into
several different categories:
o Structural things
o Behavioral things
o Grouping things
o Annotational things
Structural things
Nouns that depicts the static behavior of a model is termed as structural things. They
display the physical and conceptual components. They include class, object, interface,
node, collaboration, component, and a use case.
Class: A Class is a set of identical things that outlines the functionality and properties of
an object. It also represents the abstract class whose functionalities are not defined. Its
notation is as follows;
Object:: An individual that describes the behavior and the functions of a system. The
notation of the object is similar to that of the class; the only difference is that the object
name is always underlined and its notation is given below;
Collaboration: It represents the interaction between things that is done to meet the
goal. It is symbolized as a dotted ellipse with its name written inside it.
Use case: Use case is the core concept of object-oriented modeling. It portrays a set of
actions executed by a system to achieve the goal.
Actor: It comes under the use case diagrams. It is an object that interacts with the
system, for example, a user.
Behavioral Things
They are the verbs that encompass the dynamic parts of a model. It depicts the behavior
of a system. They involve state machine, activity diagram, interaction diagram, grouping
things, annotation things
State Machine: It defines a sequence of states that an entity goes through in the
software development lifecycle. It keeps a record of several distinct states of a system
component.
Activity Diagram: It portrays all the activities accomplished by different entities of a
system. It is represented the same as that of a state machine diagram. It consists of an
initial state, final state, a decision box, and an action notation.
Annotation Things
It is a mechanism that captures the remarks, descriptions, and comments of UML model
elements. In UML, a note is the only Annotational thing.
Note: It is used to attach the constraints, comments, and rules to the elements of the
model. It is a kind of yellow sticky note.
Relationships
Realization: It is a semantic kind of relationship between two things, where one defines
the behavior to be carried out, and the other one implements the mentioned behavior.
It exists in interfaces.
It is denoted by a dotted line with an empty arrowhead at one side.
Diagrams
The diagrams are the graphical implementation of the models that incorporate symbols
and text. Each symbol has a different meaning in the context of the UML diagram. There
are thirteen different types of UML diagrams that are available in UML 2.0, such that
each diagram has its own set of a symbol. And each diagram manifests a different
dimension, perspective, and view of the system.
A use case diagram is a visual representation of the different ways and possible
scenarios of using a system. It illustrates how a user will perform actions and interact
with a particular system, such as a website or an app.
For example, this use case diagram depicts the different functions of a banking system
for customers:
What to include: