Notes Oose
Notes Oose
1. Problem Recognition :
The main aim of requirement analysis is to fully understand main objective of requirement
that includes why it is needed, does it add value to product, will it be beneficial, does it
increase quality of the project, does it will have any other effect. All these points are fully
recognized in problem recognition so that requirements that are essential can be fulfilled to
solve business problems.
4. Specification :
The software requirement specification (SRS) which means to specify the requirement
whether it is functional or non-functional should be developed.
5. Review :
After developing the SRS, it must be reviewed to check whether it can be improved or not
and must be refined to make it better and increase the quality.
Requirements gathering is a crucial phase in the software development life cycle (SDLC) and
project management. It involves collecting, documenting, and managing the requirements that
define the features and functionalities of a system or application. The success of a project often
depends on the accuracy and completeness of the gathered requirements in software.
Stakeholder Identification:
Objective: Identify all stakeholders who will be affected by the system, directly or
indirectly.
Process: Conduct interviews, surveys, or workshops to determine the key individuals or
groups involved.
Stakeholder Analysis:
Objective: Understand the needs, expectations, and influence of each stakeholder.
Process: Analyze stakeholder inputs to prioritize requirements and manage conflicting
interests.
Problem Definition:
Objective: Clearly define the problems or opportunities that the software system aims to
address.
Process: Engage stakeholders in discussions to uncover and articulate the core problems or
opportunities.
Requirements Extraction:
Objective: Gather detailed requirements by interacting with stakeholders.
Process: Employ techniques such as interviews, surveys, observations, or brainstorming
sessions to extract requirements.
Requirements Documentation:
Objective: Document gathered requirements in a structured format.
Process: Create requirements documents, use cases, user stories, or prototypes to capture
and communicate requirements effectively.
Validation and Verification:
Objective: Ensure that gathered requirements are accurate, complete, and consistent.
Process: Conduct reviews, walkthroughs, or use validation tools to verify that the
requirements meet the defined criteria.
Processes of
Requirements Gathering in Software Development
Requirement gathering holds immense importance in software development for several critical
reasons:
1. Clarity of Project Objectives:
Requirement gathering sets the stage by defining and clarifying the objectives of the
software project. It ensures that all stakeholders, including clients, users, and
development teams, have a shared understanding of what needs to be achieved.
2. Customer Satisfaction:
Understanding and meeting customer needs is paramount for customer satisfaction.
Requirement gathering allows developers to comprehend the expectations of end-users
and clients, leading to the creation of a product that aligns with their desires and
requirements.
3. Scope Definition:
Clearly defined requirements help in establishing the scope of the project. This
delineation is crucial for managing expectations, avoiding scope creep (uncontrolled
changes to project scope), and ensuring that the project stays on track.
4. Reduced Misunderstandings:
Ambiguities and misunderstandings are common sources of project failures.
Requirement gathering facilitates clear communication between stakeholders, reducing
the risk of misinterpretations and ensuring that everyone involved is on the same page.
5. Risk Mitigation:
Identifying and addressing potential issues at the requirements stage helps mitigate
risks early in the development process. This proactive approach minimizes the chances
of costly errors, rework, and delays later in the project life cycle.
1. Feasibility Study
2. Requirements elicitation
3. Requirements specification
4. Requirements for verification and validation
5. Requirements management
1. Feasibility Study
The feasibility study mainly concentrates on below five mentioned areas below. Among these
Economic Feasibility Study is the most important part of the feasibility analysis and the Legal
Feasibility Study is less considered feasibility analysis.
1. Technical Feasibility: In Technical Feasibility current resources both hardware software
along required technology are analyzed/assessed to develop the project. This technical
feasibility study reports whether there are correct required resources and technologies that
will be used for project development. Along with this, the feasibility study also analyzes
the technical skills and capabilities of the technical team, whether existing technology can
be used or not, whether maintenance and up-gradation are easy or not for the chosen
technology, etc.
2. Operational Feasibility: In Operational Feasibility degree of providing service to
requirements is analyzed along with how easy the product will be to operate and maintain
after deployment. Along with this other operational scopes are determining the usability of
the product, Determining suggested solution by the software development team is
acceptable or not, etc.
3. Economic Feasibility: In the Economic Feasibility study cost and benefit of the project are
analyzed. This means under this feasibility study a detailed analysis is carried out will be
cost of the project for development which includes all required costs for final development
hardware and software resources required, design and development costs operational costs,
and so on. After that, it is analyzed whether the project will be beneficial in terms of
finance for the organization or not.
4. Legal Feasibility: In legal feasibility, the project is ensured to comply with all relevant
laws, regulations, and standards. It identifies any legal constraints that could impact the
project and reviews existing contracts and agreements to assess their effect on the project’s
execution. Additionally, legal feasibility considers issues related to intellectual property,
such as patents and copyrights, to safeguard the project’s innovation and originality.
5. Schedule Feasibility: In schedule feasibility, the project timeline is evaluated to determine
if it is realistic and achievable. Significant milestones are identified, and deadlines are
established to track progress effectively. Resource availability is assessed to ensure that the
necessary resources are accessible to meet the project schedule. Furthermore, any time
constraints that might affect project delivery are considered to ensure timely completion.
This focus on schedule feasibility is crucial for the successful planning and execution of a
project.
2. Requirements Elicitation
It is related to the various ways used to gain knowledge about the project domain and
requirements. The various sources of domain knowledge include customers, business manuals,
the existing software of the same type, standards, and other stakeholders of the project. The
techniques used for requirements elicitation include interviews, brainstorming, task analysis,
Delphi technique, prototyping, etc. Some of these are discussed here. Elicitation does not
produce formal models of the requirements understood. Instead, it widens the domain
knowledge of the analyst and thus helps in providing input to the next stage.
Requirements elicitation is the process of gathering information about the needs and
expectations of stakeholders for a software system. This is the first step in the requirements
engineering process and it is critical to the success of the software development project. The
goal of this step is to understand the problem that the software system is intended to solve and
the needs and expectations of the stakeholders who will use the system.
Several techniques can be used to elicit requirements, including:
Interviews: These are one-on-one conversations with stakeholders to gather information
about their needs and expectations.
Surveys: These are questionnaires that are distributed to stakeholders to gather information
about their needs and expectations.
Focus Groups: These are small groups of stakeholders who are brought together to discuss
their needs and expectations for the software system.
Observation: This technique involves observing the stakeholders in their work
environment to gather information about their needs and expectations.
Prototyping: This technique involves creating a working model of the software system,
which can be used to gather feedback from stakeholders and to validate requirements.
It’s important to document, organize, and prioritize the requirements obtained from all these
techniques to ensure that they are complete, consistent, and accurate.
3. Requirements Specification
This activity is used to produce formal software requirement models. All the requirements
including the functional as well as the non-functional requirements and the constraints are
specified by these models in totality. During specification, more knowledge about the problem
may be required which can again trigger the elicitation process. The models used at this stage
include ER diagrams, data flow diagrams(DFDs), function decomposition diagrams(FDDs),
data dictionaries, etc.
Requirements specification is the process of documenting the requirements identified in the
analysis step in a clear, consistent, and unambiguous manner. This step also involves
prioritizing and grouping the requirements into manageable chunks.
The goal of this step is to create a clear and comprehensive document that describes the
requirements for the software system. This document should be understandable by both the
development team and the stakeholders.
A Petri net consists of places, transitions, and arcs. Arcs run from a place to a transition or vice
versa, never between places or between transitions. The places from which an arc runs to a
transition are called the input places of the transition; the places to which arcs run from a
transition are called the output places of the transition.
Graphically, places in a Petri net may contain a discrete number of marks called tokens. Any
distribution of tokens over the places will represent a configuration of the net called a marking.
In an abstract sense relating to a Petri net diagram, a transition of a Petri net may fire if it
is enabled, i.e. there are sufficient tokens in all of its input places; when the transition fires, it
consumes the required input tokens, and creates tokens in its output places. A firing is atomic,
i.e. a single non-interruptible step.
Unless an execution policy (e.g. a strict ordering of transitions, describing precedence) is defined,
the execution of Petri nets is nondeterministic: when multiple transitions are enabled at the same
time, they will fire in any order.
Since firing is nondeterministic, and multiple tokens may be present anywhere in the net (even in
the same place), Petri nets are well suited for modeling the concurrent behavior of distributed
systems.
The Petri net that follows after the transition fires (Initial Petri
net in the figure above).
Definition 3. An elementary net is a net of the form EN = (N, C) where
Definition 4. A Petri net is a net of the form PN = (N, M, W), which extends the elementary net
so that
1. N = (P, T, F) is a net.
2. M: P → Z is a place multiset, where Z is a countable set. M extends the concept
of configuration and is commonly described with reference to Petri net diagrams as
a marking.
3. W: F → Z is an arc multiset, so that the count (or weight) for each arc is a measure of the
arc multiplicity.
Object diagrams are a visual representation in UML (Unified Modeling Language) that
illustrates the instances of classes and their relationships within a system at a specific point in
time. They display objects, their attributes, and the links between them, providing a snapshot
of the system’s structure during execution. Since object diagrams depict behavior when objects
have been instantiated, we can study the behavior of the system at a particular instant.
3. Link
We use a link to represent a relationship between two objects. We represent the number of
participants on the link for each, at the end of the link. The term link is used to specify a
relationship between two instance specifications or objects. We use a solid line to represent a
link between two objects.
For Example – In the figure below, an object of class Student is linked to an object of class
College
4. Dependency Relationships
We use a dependency relationship to show when one element depends on another element. A
dependency is used to depict the relationship between dependent and independent entities in
the system.
Any change in the definition or structure of one element may cause changes to the other.
This is a unidirectional kind of relationship between two objects.
Dependency relationships are of various types specified with keywords like Abstraction,
Binding, Realization, Substitution and Usage are the types of dependency relationships
used in UML.
For example – In the figure below, an object of Player class is dependent (or uses) an object
of Bat class.
5. Association
Association is a reference relationship between two objects (or classes). An association line
connects two object boxes, representing a relationship between instances of two classes. We
use association when one object references members of the other object. Association can be
uni-directional or bi-directional. We use an arrow to represent association.
For example – The object of Order class is associated with an object of Customer class.
6. Aggregation
Aggregation represents a “has a” relationship. We use a hollow diamond on the containing
object with a line which joins it to the contained object.
Aggregation is a specific form of association.
It is a kind of parent-child relationship however it isn’t inheritance.
Aggregation occurs when the lifecycle of the contained objects does not strongly depend on
the lifecycle of container objects.
For example – A library has an aggregation relationship with books. Library has books or
books are a part of library. The existence of books is independent of the existence of the
library.
7. Composition
Composition is a type of association where the child cannot exist independent of the other. We
use a filled diamond on the containing object with a line which joins it to the contained object.
Composition is also a special type of association. It is also a kind of parent child relationship
but it is not inheritance. So whenever independent existence of the child is not possible we use
a composition relationship.
Consider the example of a boy Gurkaran: Gurkaran is composed of legs and arms. Here
Gurkaran has a composition relationship with his legs and arms. Here legs and arms can’t
exist without the existence of their parent object.
A Use Case Diagram in Unified Modeling Language (UML) is a visual representation that
illustrates the interactions between users (actors) and a system. It captures the functional
requirements of a system, showing how different users engage with various use cases, or specific
functionalities, within the system. Use case diagrams provide a high-level overview of a
system’s behavior, making them useful for stakeholders, developers, and analysts to understand
how a system is intended to operate from the user’s perspective, and how different processes
relate to one another. They are crucial for defining system scope and requirements.
2. Use Cases
Use cases are like scenes in the play. They represent specific things your system can do. In the
online shopping system, examples of use cases could be "Place Order," "Track Delivery," or
"Update Product Information". Use cases are represented by ovals.
3. System Boundary
The system boundary is a visual representation of the scope or limits of the system you are
modeling. It defines what is inside the system and what is outside. The boundary helps to
establish a clear distinction between the elements that are part of the system and those that are
external to it. The system boundary is typically represented by a rectangular box that surrounds
all the use cases of the system.
The purpose of system boundary is to clearly outlines the boundaries of the system, indicating
which components are internal to the system and which are external actors or entities interacting
with the system.
2. Include Relationship
The Include Relationship indicates that a use case includes the functionality of another use case.
It is denoted by a dashed arrow pointing from the including use case to the included use case.
This relationship promotes modular and reusable design.
Example: Social Media Posting
Use Cases: Compose Post, Add Image
Include Relationship: The "Compose Post" use case includes the functionality of "Add
Image." Therefore, composing a post includes the action of adding an image.
3. Extend Relationship
The Extend Relationship illustrates that a use case can be extended by another use case under
specific conditions. It is represented by a dashed arrow with the keyword "extend." This
relationship is useful for handling optional or exceptional behavior.
Example: Flight Booking System
Use Cases: Book Flight, Select Seat
Extend Relationship: The "Select Seat" use case may extend the "Book Flight" use case
when the user wants to choose a specific seat, but it is an optional step.
4. Generalization Relationship
The Generalization Relationship establishes an "is-a" connection between two use cases,
indicating that one use case is a specialized version of another. It is represented by an arrow
pointing from the specialized use case to the general use case.
Example: Vehicle Rental System
Use Cases: Rent Car, Rent Bike
Generalization Relationship: Both "Rent Car" and "Rent Bike" are specialized versions of
the general use case "Rent Vehicle."
Generalization Relationship
A UML class diagram is a visual tool that represents the structure of a system by showing its
classes, attributes, methods, and the relationships between them. It helps everyone involved in
a project—like developers and designers—understand how the system is organized and how its
components interact.
What are class Diagrams?
Class diagrams are a type of UML (Unified Modeling Language) diagram used in software
engineering to visually represent the structure and relationships of classes within a system i.e.
used to construct and visualize object-oriented systems.
In these diagrams, classes are depicted as boxes, each containing three compartments for the
class name, attributes, and methods. Lines connecting classes illustrate associations, showing
relationships such as one-to-one or one-to-many.
Class diagrams provide a high-level overview of a system’s design, helping to communicate
and document the structure of the software. They are a fundamental tool in object-oriented
design and play a crucial role in the software development lifecycle.
What is a class?
In object-oriented programming (OOP), a class is a blueprint or template for creating objects.
Objects are instances of classes, and each class defines a set of attributes (data members) and
methods (functions or procedures) that the objects created from that class will possess. The
attributes represent the characteristics or properties of the object, while the methods define the
behaviors or actions that the object can perform.
UML Class Notation
class notation is a graphical representation used to depict classes and their relationships in
object-oriented modeling.
1. Class Name:
The name of the class is typically written in the top compartment of the class box and is
centered and bold.
2. Attributes:
Attributes, also known as properties or fields, represent the data members of the class.
They are listed in the second compartment of the class box and often include the
visibility (e.g., public, private) and the data type of each attribute.
3. Methods:
Methods, also known as functions or operations, represent the behavior or functionality
of the class. They are listed in the third compartment of the class box and include the
visibility (e.g., public, private), return type, and parameters of each method.
4. Visibility Notation:
Visibility notations indicate the access level of attributes and methods. Common
visibility notations include:
o + for public (visible to all classes)
o - for private (visible only within the class)
o # for protected (visible to subclasses)
o ~ for package or default visibility (visible to classes in the same package)
Parameter Directionality
In class diagrams, parameter directionality refers to the indication of the flow of information
between classes through method parameters. It helps to specify whether a parameter is an
input, an output, or both. This information is crucial for understanding how data is passed
between objects during method calls.
There are three main parameter directionality notations used in class diagrams:
In (Input):
o An input parameter is a parameter passed from the calling object (client) to the
called object (server) during a method invocation.
o It is represented by an arrow pointing towards the receiving class (the class that
owns the method).
Out (Output):
o An output parameter is a parameter passed from the called object (server) back
to the calling object (client) after the method execution.
o It is represented by an arrow pointing away from the receiving class.
InOut (Input and Output):
o An InOut parameter serves as both input and output. It carries information from
the calling object to the called object and vice versa.
o It is represented by an arrow pointing towards and away from the receiving
class.
Relationships between classes
In class diagrams, relationships between classes describe how classes are connected or interact
with each other within a system. There are several types of relationships in object-oriented
modeling, each serving a specific purpose. Here are some common types of relationships in
class diagrams:
1. Association
An association represents a bi-directional relationship between two classes. It indicates that
instances of one class are connected to instances of another class. Associations are typically
depicted as a solid line connecting the classes, with optional arrows indicating the direction of
the relationship.
Let’s understand association using an example:
Let’s consider a simple system for managing a library. In this system, we have two main
entities: Book and Library. Each Library contains multiple Books, and each Book belongs to a
specific Library. This relationship between Library and Book represents an association.
The “Library” class can be considered the source class because it contains a reference to
multiple instances of the “Book” class. The “Book” class would be considered the target class
because it belongs to a specific library.
2. Directed Association
A directed association in a UML class diagram represents a relationship between two classes
where the association has a direction, indicating that one class is associated with another in a
specific way.
In a directed association, an arrowhead is added to the association line to indicate the
direction of the relationship. The arrow points from the class that initiates the association to
the class that is being targeted or affected by the association.
Directed associations are used when the association has a specific flow or directionality,
such as indicating which class is responsible for initiating the association or which class
has a dependency on another.
Consider a scenario where a “Teacher” class is associated with a “Course” class in a
university system. The directed association arrow may point from the “Teacher” class to the
“Course” class, indicating that a teacher is associated with or teaches a specific course.
The source class is the “Teacher” class. The “Teacher” class initiates the association by
teaching a specific course.
The target class is the “Course” class. The “Course” class is affected by the association as
it is being taught by a specific teacher.
3. Aggregation
Aggregation is a specialized form of association that represents a “whole-part” relationship. It
denotes a stronger relationship where one class (the whole) contains or is composed of another
class (the part). Aggregation is represented by a diamond shape on the side of the whole class.
In this kind of relationship, the child class can exist independently of its parent class.
Let’s understand aggregation using an example:
The company can be considered as the whole, while the employees are the parts. Employees
belong to the company, and the company can have multiple employees. However, if the
company ceases to exist, the employees can still exist independently.
4. Composition
Composition is a stronger form of aggregation, indicating a more significant ownership or
dependency relationship. In composition, the part class cannot exist independently of the whole
class. Composition is represented by a filled diamond shape on the side of the whole class.
Let’s understand Composition using an example:
Imagine a digital contact book application. The contact book is the whole, and each contact
entry is a part. Each contact entry is fully owned and managed by the contact book. If the
contact book is deleted or destroyed, all associated contact entries are also removed.
This illustrates composition because the existence of the contact entries depends entirely on the
presence of the contact book. Without the contact book, the individual contact entries lose their
meaning and cannot exist on their own.
5. Generalization(Inheritance)
Inheritance represents an “is-a” relationship between classes, where one class (the subclass or
child) inherits the properties and behaviors of another class (the superclass or parent).
Inheritance is depicted by a solid line with a closed, hollow arrowhead pointing from the
subclass to the superclass.
In the example of bank accounts, we can use generalization to represent different types of
accounts such as current accounts, savings accounts, and credit accounts.
The Bank Account class serves as the generalized representation of all types of bank accounts,
while the subclasses (Current Account, Savings Account, Credit Account) represent
specialized versions that inherit and extend the functionality of the base class.
7. Dependency Relationship
A dependency exists between two classes when one class relies on another, but the relationship
is not as strong as association or inheritance. It represents a more loosely coupled connection
between classes. Dependencies are often depicted as a dashed arrow.
Let’s consider a scenario where a Person depends on a Book.
Person Class: Represents an individual who reads a book. The Person class depends on the
Book class to access and read the content.
Book Class: Represents a book that contains content to be read by a person. The Book
class is independent and can exist without the Person class.
The Person class depends on the Book class because it requires access to a book to read its
content. However, the Book class does not depend on the Person class; it can exist
independently and does not rely on the Person class for its functionality.
8. Usage(Dependency) Relationship
A usage dependency relationship in a UML class diagram indicates that one class (the client)
utilizes or depends on another class (the supplier) to perform certain tasks or access certain
functionality. The client class relies on the services provided by the supplier class but does not
own or create instances of it.
In UML class diagrams, usage dependencies are typically represented by a dashed arrowed
line pointing from the client class to the supplier class.
The arrow indicates the direction of the dependency, showing that the client class depends
on the services provided by the supplier class.
Consider a scenario where a “Car” class depends on a “FuelTank” class to manage fuel
consumption.
The “Car” class may need to access methods or attributes of the “FuelTank” class to check
the fuel level, refill fuel, or monitor fuel consumption.
In this case, the “Car” class has a usage dependency on the “FuelTank” class because it
utilizes its services to perform certain tasks related to fuel management.
Interaction Overview Diagrams (IODs) in UML (Unified Modeling Language) provide a high-
level view of the interactions between various components or objects in a system. They are used
to visualize the flow of control and interactions within a system, showing how different parts of
the system communicate and collaborate to achieve a specific goal.
2. Interaction Use
An Interaction Use is used to represent a reference to another interaction or sequence of
interactions defined in another diagram or part of the system.An Interaction Use is represented
by a rectangular box . Inside the box, you can include a label that specifies the name or reference
of the interaction being used.
3. Interaction Fragment
Interaction fragments are used to group and organize interactions within the diagram.
4. Object Lifeline
Represents the lifespan of an object during the interaction. It is a vertical dashed line that extends
from the top of the diagram to the Bottom, with the object's name or class at the top.
5. Message
Represents communication between objects or components in the system. Messages are shown
as arrows between lifelines, indicating the direction of communication.
6. Control Flow
Represents the flow of control or sequence of actions in the interaction. It is shown as a solid
arrow between elements in the diagram, indicating the order in which actions are performed.
8. Decision Node
Represents a point in the interaction where a decision is made based on a condition. It is shown
as a small diamond shape with incoming and outgoing control flow arrows representing different
paths based on the decision.
9. Receive Signal Node
Represents the receipt of a signal or event during the interaction. It is shown as a small rectangle
with an incoming control flow arrow.
11. Note
Represents additional information or comments about the diagram. Notes are shown as a small
rectangle with a label indicating the content of the note.
Activity diagrams are an essential part of the Unified Modeling Language (UML) that help
visualize workflows, processes, or activities within a system. They depict how different actions
are connected and how a system moves from one state to another. By offering a clear picture of
both simple and complex workflows, activity diagrams make it easier for developers and
stakeholders to understand how various elements interact in a system.
In activity diagrams, the notations are like visual symbols that help represent different elements
and actions in a simple way.
1. Initial State
The starting state before an activity takes place is depicted using the initial state.
A process can have only one initial state unless we are depicting nested activities. We use a black
filled circle to depict the initial state of a system. For objects, this is the state when they are
instantiated. The Initial State from the UML Activity Diagram marks the entry point and the
initial Activity State.
For example:
Here the initial state of the system before the application is opened.
5. Guard
A Guard refers to a statement written next to a decision node on an arrow sometimes within
square brackets.
The statement must be true for the control to shift along a particular direction. Guards help us
know the constraints and conditions which determine the flow of a process.
6. Fork
Fork nodes are used to support concurrent activities. When we use a fork node when both the
activities get executed concurrently i.e. no decision is made before splitting the activity into two
parts. Both parts need to be executed in case of a fork statement. We use a rounded solid
rectangular bar to represent a Fork notation with incoming arrow from the parent activity state
and outgoing arrows towards the newly created activities.
For example:
In the example below, the activity of making coffee can be split into two concurrent activities and
hence we use the fork notation.
7
. Join
Join nodes are used to support concurrent activities converging into one. For join notations we
have two or more incoming edges and one outgoing edge.
For example:
When both activities i.e. steaming the milk and adding coffee get completed, we converge them
into one final activity.
9. Swimlanes
We use Swimlanes for grouping related activities in one column. Swimlanes group related
activities into one column or one row. Swimlanes can be vertical and horizontal. Swimlanes are
used to add modularity to the activity diagram. It is not mandatory to use swimlanes. They
usually give more clarity to the activity diagram. It’s similar to creating a function in a program.
It’s not mandatory to do so, but, it is a recommended practice.
We use a rectangular column to represent a swimlane as shown in the figure above.
For example:
Here different set of activities are executed based on if the number is odd or even. These
activities are grouped into a swimlane.
Can represent both simple and Typically used for simpler, linear
complex workflows, including processes, though can handle
Complexity concurrent processing. limited complexity.
Uses UML symbols like initial Uses basic symbols like rectangles
nodes, activity nodes, decisions, (process), diamonds (decisions),
Symbols swimlanes, etc. and arrows (flow).
A State Machine Diagram is used to represent the condition of the system or part of the
system at finite instances of time. It’s a behavioral diagram and it represents the behavior using
finite state transitions. In this article, we will explain what is a state machine diagram, the
components, and the use cases of the state machine diagram.
The State Machine Diagram above shows the different states in which the verification sub-system
or class exist for a particular system.
Basic components and notations of a State Machine diagram
Below are the basic components and their notations of a State Machine Diagram:
1. Initial state
We use a black filled circle represent the initial state of a System or a Class.
2. Transition
We use a solid arrow to represent the transition or change of control from one state to another.
The arrow is labelled with the event which causes the change in state.
3. State
We use a rounded rectangle to represent a state. A state represents the conditions or
circumstances of an object of a class at an instant of time.
4. Fork
We use a rounded solid rectangular bar to represent a Fork notation with incoming arrow from
the parent state and outgoing arrows towards the newly created states. We use the fork notation
to represent a state splitting into two or more concurrent states.
5. Join
We use a rounded solid rectangular bar to represent a Join notation with incoming arrows from
the joining states and outgoing arrow towards the common goal state. We use the join notation
when two or more states concurrently converge into one on the occurrence of an event or events.
6. Self transition
We use a solid arrow pointing back to the state itself to represent a self transition. There might be
scenarios when the state of the object does not change upon the occurrence of an event. We use
self transitions to represent such cases.
7. Composite state
We use a rounded rectangle to represent a composite state also. We represent a state with internal
activities using a composite state.
8. Final State
We use a filled circle within a circle notation to represent the final state in a state machine
diagram.
The UML diagrams we draw depend on the system we aim to represent. Here is just an example
of how an online ordering system might look like :
On the event of an order being received, we transit from our initial state to Unprocessed
order state.
The unprocessed order is then checked.
If the order is rejected, we transit to the Rejected Order state.
If the order is accepted and we have the items available we transit to the fulfilled order state.
However if the items are not available we transit to the Pending Order state.
After the order is fulfilled, we transit to the final state. In this example, we merge the two
states i.e. Fulfilled order and Rejected order into one final state.
Note: Here we could have also treated fulfilled order and rejected order as final states
separately.
Applications of State Machine Diagram
Below are the main use cases of state machine diagram:
State Machine Diagrams are very useful for modeling and visualizing the dynamic behavior
of a system.
They are also used in UI design where they help to illustrate how the interface changes in
response to user actions, helping designers to create a better use experience.
In game design, state machine diagrams can help model the behavior of characters or objects,
detailing how they change states based on player interactions or game events
In embedded systems, where hardware interacts with software to perform tasks, State
Machine Diagrams are valuable for representing the control logic and behavior of the system.
What are the Differences between a State Machine Diagram and a Flowchart?
Before understanding the differences between a state machine diagram and a flowchart, firstly
understand what is a flowchart:
What is a Flowchart?
An algorithm is like a set of clear instructions to solve a problem, and a flowchart is a picture
that shows those instructions.
When we’re writing computer programs, a flowchart helps us map out the steps of the
algorithm to solve the problem.
Non programmers use Flow charts to model workflows.
We can call a flowchart a primitive version of an activity diagram.
Business processes where decision making is involved is expressed using a flow chart.
Example:
A manufacturer uses a flow chart to explain and illustrate how a particular product is
manufactured.
State Machine Diagram vs. Flow Chart?
Below are the main differences between a state machine diagram and a flowchart:
State Machine Diagram Flow Chart
An State Machine Diagram is associated with A Flow Chart is associated with the
the UML(Unified Modelling Language) programming.
The basic purpose of a state machine diagram A flowchart on the other hand portrays the
is to portray various changes in state of the processes or commands that on execution
class and not the processes or commands change the state of class or an object of the
causing the changes. class.
Primarily used for systems, emphasizing their Often used for processes, procedures, or
states and transitions. algorithms involving actions and decisions.
Functional Modelling:
A functional model of a system specifies how the output values are computed in the system
from the input values, without considering the control aspects of the computation.
This represents the functional view of the system – the mapping from inputs to outputs and
the various steps involved in the mapping.
The functional model of a system can be represented by a data flow diagram(DFD).
As processes represent operations and in an object – oriented system, most of the processing
is done by operations on classes, all processes should show up as operations on classes.
provides the outline that what the system is supposed to do .It does not describes what is the need
of evaluation of data, when they are evaluated and how they are evaluated apart from all it only
represent origin of data values. It describes the function of internal processes with the help of
DFD.
DFD (Data Flow Diagram)
. Data Flow Diagrams: Function modelling is represented with the help of DFDs. DFD is the
graphically representation of data. It shows the input, output and processing of the system .When
we are trying to create our own business, website, system, project then there is need to find out
how information passes from one process to another so all are done by DFD. There are number
of levels in DFD but upto third level DFD is sufficient for understanding of any system. The
basic components of the DFD are:
1. External Entity : External entity is the entity that takes information and gives information to
the system. It is represented with rectangle.
2. Data Flow : The data passes from one place to another is shown by data flow. Data flow is
represented with arrow and some information written over it.
3. Process : It is also called function symbol .It is used to process all the information .If there
are calculations so all are done in the process part .It is represented with circle and name of
the process and level of DFD written inside it.
4. Data Store : It is used to store the information and retrieve the stored information .It is
represented with double parallel lines.
Some Guidelines for creating a DFD:
1. Every process must have meaningful name and number.
2. Level 0 DFD must have only one process.
3. Every data flow and arrow has given the name.
4. DFD should be logical consistent.
5. DFD should be organised in such a way that it is easy to understand.
6. There should be no loop in the DFD.
7. Each DFD should not have more than 6 processes.
8. The process can only connected with process, external entity and data store.
9. External entity cannot be directly connected with external entity.
10. The direction of DFD is left to right and top to bottom representation.
Data Flow Diagram (DFD) represents the flow of data within information systems. Data Flow
Diagrams (DFD) provide a graphical representation of the data flow of a system that can be
understood by both technical and non-technical users. The models enable software engineers,
customers, and users to work together effectively during the analysis and specification of
requirements.
0-level DFD
It is also known as a context diagram. It’s designed to be an abstraction view, showing the
system as a single process with its relationship to external entities. It represents the entire system
as a single bubble with input and output data indicated by incoming/outgoing arrows.
1-Level DFD
This level provides a more detailed view of the system by breaking down the major processes
identified in the level 0 DFD into sub-processes. Each sub-process is depicted as a separate
process on the level 1 DFD. The data flows and data stores associated with each sub-process are
also shown. In 1-level DFD, the context diagram is decomposed into multiple bubbles/processes.
In this level, we highlight the main functions of the system and breakdown the high-level process
of 0-level DFD into subprocesses.
2-level DFD
This level provides an even more detailed view of the system by breaking down the sub-
processes identified in the level 1 DFD into further sub-processes. Each sub-process is depicted
as a separate process on the level 2 DFD. The data flows and data stores associated with each
sub-process are also shown.
Rules for Data Flow Diagram (DFD)
Following are the rules of DFD:
Data can flow from:
o Terminator or External Entity to Process
o Process to Terminator or External Entity
o Process to Data Store
o Data Store to Process
o Process to Process
Data Cannot Flow From
o Terminator or External Entity to Terminator or External Entity
o Terminator or External Entity to Data Store
o Data Store to Terminator or External Entity
o Data Store to Data Store
Advantages of Data Flow Diagram (DFD)
It helps us to understand the functioning and the limits of a system.
It is a graphical representation which is very easy to understand as it helps visualize contents.
Data Flow Diagram represent detailed and well explained diagram of system components.
It is used as the part of system documentation file.
Data Flow Diagrams can be understood by both technical or nontechnical person because
they are very easy to understand.
Disadvantages of Data Flow Diagram (DFD)
At times Data Flow Diagram (DFD) can confuse the programmers regarding the system.
Data Flow Diagram takes long time to be generated, and many times due to this reasons
analysts are denied permission to work on it.
How to Draw Data Flow Diagram?
Following are the steps to Draw Data Flow Diagram
Understand the System
Identify External Entities
Identify Processes
Identify Data Stores
Use Standard Symbols
Create Level 0 Diagram
Based on Complexity Draw Further Level Diagram like Level 1, 2 and so on.
Identify Data Flows:
Number Processes and Data Stores
Review and Validate
Conclusion
Data Flow Diagram ( DFD) are visual maps that provides a clear understanding of how
information moves within a information system. Data Flow Diagrams (DFD) consist of four
component i.e. Processes that represent system’s functionality, External Entities that represent
the end users, data store that represent database or data ware house and data flow that represent
how data are flow among these three components. DFD help everyone, from computer experts to
regular users, as it provide a clear understanding of how a system works and how different parts
of it interact. By using DFDs, people can work together effectively to analyze, design, and
communicate about systems.
Frequently Asked Questions (FAQs) related to Data Flow Diagram (DFD)
What are the 4 components of DFD?
Four Components of DFD are:
Process
Data Flow
Data Store
External Entity
4. Central Repository: It provides a single point of storage for data diagrams, reports, and
documents related to project management.
5. Documentation Generators: It helps in generating user and technical documentation as per
standards. It creates documents for technical users and end users.
For example, Doxygen, DrExplain, Adobe RoboHelp for documentation.
6. Code Generators: It aids in the auto-generation of code, including definitions, with the help
of designs, documents, and diagrams.
7. Tools for Requirement Management: It makes gathering, evaluating, and managing
software needs easier.
8. Tools for Analysis and Design: It offers instruments for modelling system architecture and
behaviour, which helps throughout the analysis and design stages of software development.
9. Tools for Database Management: It facilitates database construction, design, and
administration.
10. Tools for Documentation: It makes the process of creating, organizing, and maintaining
project documentation easier.
Advantages of the CASE approach:
Improved Documentation: Comprehensive documentation creation and maintenance is
made easier by CASE tools. Since automatically generated documentation is usually more
accurate and up to date, there are fewer opportunities for errors and misunderstandings
brought on by out-of-current material.
Reusing Components: Reusable component creation and maintenance are frequently
facilitated by CASE tools. This encourages a development approach that is modular and
component-based, enabling teams to shorten development times and reuse tested solutions.
Quicker Cycles of Development: Development cycles take less time when certain jobs,
such testing and code generation, are automated. This may result in software solutions being
delivered more quickly, meeting deadlines and keeping up with changing business
requirements.
Improved Results: Code generation, documentation, and testing are just a few of the time-
consuming, repetitive operations that CASE tools perform. Due to this automation, engineers
are able to concentrate on more intricate and imaginative facets of software development,
which boosts output.
Achieving uniformity and standardization: Coding conventions, documentation
formats and design patterns are just a few of the areas of software development where CASE
tools enforce uniformity and standards. This guarantees consistent and maintainable software
development.
Disadvantages of the CASE approach:
Cost: Using a case tool is very costly. Most firms engaged in software development on a
small scale do not invest in CASE tools because they think that the benefit of CASE is
justifiable only in the development of large systems.
Learning Curve: In most cases, programmers’ productivity may fall in the initial phase of
implementation, because users need time to learn the technology. Many consultants offer
training and on-site services that can be important to accelerate the learning curve and to the
development and use of the CASE tools.
Tool Mix: It is important to build an appropriate selection tool mix to urge cost advantage
CASE integration and data integration across all platforms is extremely important.