software engineering notes2_Module2
software engineering notes2_Module2
Module-2
Requirement Engineering: The process to gather the software requirements from client,
analyze and document them is known as requirement engineering. The goal of requirement
engineering is to develop and maintain sophisticated and descriptive ‘System Requirements
Specification’ document.
Requirements engineering is a broad domain that focuses on being the connector between
modeling, analysis, design, and construction. It is the process that defines, identifies, manages,
and develops requirements in a software engineering design process. This process uses tools,
methods, and principles to describe the system’s behavior and the constraints that
come along with it.
Requirements engineering is the most important part every business must follow, in order to
build and release a project successfully, as it is the foundation to key planning
and implementation.
Functional Requirements: These are the requirements that the end user specifically
demands as basic facilities that the system should offer. It can be a calculation, data
manipulation, business process, user interaction, or any other specific functionality which
defines what function a system is likely to perform.
Functional Requirements in Software Engineering are also called
Functional Specification. They are basically the requirements stated by the user which
one can see directly in the final product.
Non-functional requirements: These are basically the quality constraints that the system
must satisfy according to the project contract. Nonfunctional requirements, not related to
the system functionality, rather define how the system should perform.
They are also called non-behavioral requirements. They basically deal with issues like:
Portability
Security
Maintainability
Reliability
Scalability
Performance
Reusability
Flexibility
Domain requirements: Domain requirements are the requirements which are
characteristic of a particular category or domain of projects. Domain requirements can be
functional or nonfunctional.
These requirements are therefore identified from that domain model and are
not user specific.
User requirements: These requirements describe what the end-user wants from the
software system. User requirements are usually expressed in natural language and are
typically gathered through interviews, surveys, or user feedback.
System requirements: These requirements specify the technical characteristics of the
software system, such as its architecture, hardware requirements, software components,
and interfaces. System requirements are typically expressed in technical terms and are
often used as a basis for system design.
Business requirements: These requirements describe the business goals and objectives
that the software system is expected to achieve. Business requirements are usually
expressed in terms of revenue, market share, customer satisfaction, or other
business metrics.
Regulatory requirements: These requirements specify the legal or regulatory standards
that the software system must meet. Regulatory requirements may include data privacy,
security, accessibility, or other legal compliance requirements.
Interface requirements: These requirements specify the interactions between the
software system and external systems or components, such as databases, web services, or
other software applications.
Design requirements: These requirements describe the technical design of the software
system. They include information about the software architecture, data structures,
algorithms, and other technical aspects of the software.
Inception
Elicitation
Elaboration
Negotiation
Specification
Validation
Requirements Management
Inception:
This is the first phase of the requirements analysis process. This phase gives an
outline of how to get started on a project. In the inception phase, all the basic
questions are asked on how to go about a task or the steps required
accomplishing a task.
Overall in the inception phase, the following criteria have to be addressed by the
software engineers:
Understanding of the problem.
The people who want a solution
Nature of the solution
Communication and collaboration between the customer and developer
Elicitation:
This is the second phase of the requirements analysis process. This phase focuses
on gathering the requirements from the stakeholders. One should be careful in
this phase, as the requirements which are establishes are the key purpose of a
project. Understanding the kind of requirements needed from the customer is
very crucial for a developer.
The right people must be involved in this phase. The following problems can
occur in the elicitation phase:
Problem of Scope: The requirements given are of unnecessary detail, ill-
defined, or not possible to implement.
Problem of Understanding: Not having a clear-cut understanding between
the developer and customer when putting out the requirements needed.
Sometimes the customer might not know what they want or the developer
might misunderstand one requirement for another.
Problem of Volatility: Requirements changing over time can cause difficulty
in leading a project. It can lead to loss and wastage of resources and time.
Elaboration: This is the third phase of the requirements analysis process. This
phase is the result of the inception and elicitation phase. In the elaboration
process, it takes the requirements that have been stated and gathered in the first
two phases and refines them.
Negotiation: This is the fourth phase of the requirements analysis process.
This phase emphasizes discussion and exchanging conversation on what is
needed and what is to be eliminated. In the negotiation phase, negotiation is
between the developer and the customer and they dwell on how to go about the
project with limited business resources.
The following are discussed in the negotiation phase:
Availability of Resources.
Delivery Time
Scope of requirements
Project Cost
Estimations on development.
Specification: This is the fifth phase of the requirements analysis process
This phase specifies the following:
Written document
A set of models
A collection of use cases
A prototype
Requirements reviews/inspections
Prototyping
Test-case generation
Automated consistency analysis
Requirements Management
Software Requirement Specification (SRS) Format as name suggests, is complete specification and
description of requirements of software that needs to be fulfilled for successful development of
software system. These requirements can be functional as well as non-functional depending upon type
of requirement.
In order to form a good SRS, here you will see some points which can be used and should be considered
to form a structure of good SRS. These are as follows:
1. Introduction
1. Introduction :
(i) Purpose of this Document – At first, main aim of why this document is necessary and what’s
purpose of document is explained and described.
(ii) Scope of this document – In this, overall working and main objective of document and what
value it will provide to customer is described and explained. It also includes a description of
development cost and time required.
(iii) Overview – In this, description of product is explained. It’s simply summary or overall review
of product.
2. General description : In this, general functions of product which includes objective of user, a
user characteristic, features, benefits, about why its importance is mentioned. It also describes
features of user community.
3. Functional Requirements: In this, possible outcome of software system which includes effects
due to operation of program is fully explained. All functional requirements which may include
calculations, data processing, etc. are placed in a ranked order.
4. Interface Requirements: In this, software interfaces which mean how software program
communicates with each other or users both in form of any language, code, or message are
fully described and explained. Examples can be shared memory, data streams, etc.
5. Performance Requirements: In this, how a software system performs desired functions under
specific condition is explained. It also explains required time, required memory, maximum error
rate, etc.
6. Design Constraints: In this, constraints which simply mean limitation or restriction are specified
and explained for design team. Examples may include use of a particular algorithm, hardware
and software limitations, etc.
7. Non-Functional Attributes: In this, non-functional attributes are explained that are required by
software system for better performance. An example may include Security, Portability,
Reliability, Reusability, Application compatibility, Data integrity, Scalability capacity, etc.
8. Preliminary Schedule and Budget: In this, initial version and budget of project plan are
explained which include overall time duration required and overall cost required for
development of project.
9. Appendices: In this, additional information like references from where information is gathered,
definitions of some specific terms, acronyms, abbreviations, etc. are given and explained.
Good SRS Document includes:
Complete: The SRS should include all the requirements for the software system, including both
functional and non-functional requirements.
Consistent: The SRS should be consistent in its use of terminology and formatting, and should be
free of contradictions.
Unambiguous: The SRS should be clear and specific, and should avoid using vague or imprecise
language.
Traceable: The SRS should be traceable to other documents and artifacts, such as use cases and
user stories, to ensure that all requirements are being met.
Verifiable: The SRS should be verifiable, which means that the requirements can be tested and
validated to ensure that they are being met.
Modifiable: The SRS should be modifiable, so that it can be updated and changed as the
software development process progresses.
Prioritized: The SRS should prioritize requirements, so that the most important requirements are
addressed first.
Testable: The SRS should be written in a way that allows the requirements to be tested and
validated.
High-level and low-level: The SRS should provide both high-level requirements (such as overall
system objectives) and low-level requirements (such as detailed functional requirements).
Relevant: The SRS should be relevant to the software system that is being developed, and
should not include unnecessary or irrelevant information.
Human-readable: The SRS should be written in a way that is easy for non-technical stakeholders
to understand and review.
Aligned with business goals: The SRS should be aligned with the overall business goals and
objectives of the organization, so that the software system meets the needs of the business.
Agile methodologies: Agile methodologies, such as Scrum and Kanban, provide an iterative
approach to requirements capturing and validation, where requirements are captured and
validated in small chunks of functionality and feedback is gathered from the customer.
Requirement Models
Scenario-based model
Class-based model
Behavioral model
Scenario-based model
Scenario-based modeling is one of the sub-stages of requirements modeling. It's also typically
the first stage of requirements modeling, since it identifies the primary use cases for the
proposed software system or application, to which later stages of requirements modeling will
refer.
Using a scenario-based approach, system is described from user’s point of view. For example,
basic use cases and their corresponding use-case diagrams evolve into more elaborate
template-based use cases. Figure 1(a) depicts a UML activity diagram for eliciting requirements
and representing them using use cases. There are three levels of elaboration.
Class-basedModel
A collection of things that have similar attributes and common behaviors i.e., objects are
categorized into classes. For example, a UML case diagram can be used to depict a Sensor
class for the Safe Home security function. Note that diagram lists attributes of sensors and
operations that can be applied to modify these attributes. In addition to class diagrams, other
analysis modeling elements depict manner in which classes collaborate with one another and
relationships and interactions between classes.
It shows the process that transforms incoming data flows into outgoing data
flows.
Process that performs this transformation normally creates as well as uses data.
External entities send and receive data flow from the systems.
It is also called a bubble chart.
Data flow diagram support a top-down approach for analysis.
Data flow diagram consists of a series of symbols joined together by a line. Data objects are
represented by circles which are also called bubble charts. Data flow diagram is represented in
hierarchical order. The first level data flow model is also called as DFD 0 level or context
diagrams which represents the system as a whole. Second level data flow model refines the
context diagram and provides more details of first-level DFD. In a similar way, third level DFD
refines the second level DFD, and so on. Data flow analysis models are developed by two
organizations – Yourdon incorporation and Gane and Sarson
Data Flow: It represents the movement of data flow from a specific origin to a destination.
Process: It represents the users, procedures, or devices that use the data.
Entity: It represents the source of data or destination data external sources or destination of
data which may be users, programs, organizations or other entities that interact with the system
but are outside its boundary.
Data Store: There can be a single DFD diagram or can be exploded into various levels lime level
1, level 2, level 3, etc.
State Diagram
State diagram is a dynamic model which represents the changes of state that an object goes through
during the lifetime in response to events. It is used to help the developer better understand any
complex functionality of specialized areas of the system.
1. Initial State
It represents the start point of the diagram. It is also called as pseudo state where state has no variables
and no activities.
2. Final State
It represents the end point of the diagram. It is also pseudo state as it doesn’t have any variable or
activities. State diagram can have zero or more final states.
3. State
It represents the state of the object at an instant of time. State is a recognizable situation and exists over
an interval of time.
4. Transition
It represents the changes from one state to other. It is denoted by an arrow. The event or action causing
the transition is written beside the arrow, separated by slash. Triggerless transition occurs when the
state completed an activity.
5. Event and Action
Trigger that causes a transition to occur and changes the state is called event or action.
6. History State
A flow may require that the object go into a wait state and on the occurrence of a certain event, go back
to the state it was in, in this situation this notation is used.
7. Signal
When even causes the trigger to be sent to a state that causes the transition, then that message sent by
the event is called a signal.
8. Self-Transition
A state that has a transition that returns to itself is called self-transition.