Module 2 SOFTWARE TCET AI&DS
Module 2 SOFTWARE TCET AI&DS
Module 2
Requirements Analysis and
Modelling
By,
Ms.Swati Mahalle
Requirement Engineering
• Requirements engineering (RE) refers to the process of defining, documenting,
and maintaining requirements in the engineering design process.
The models used at this stage include ER diagrams, data flow diagrams (DFDs),
function decomposition diagrams (FDDs), data dictionaries, etc.
• Data Flow Diagrams: Data Flow Diagrams (DFDs) are used widely for modeling
the requirements. DFD shows the flow of data through a system. The system may
be a company, an organization, a set of procedures, a computer hardware system,
a software system, or any combination of the preceding. The DFD is also known
as a data flow graph or bubble chart.
• Data Dictionaries: Data Dictionaries are simply repositories to store information
about all data items defined in DFDs. At the requirements stage, the data
dictionary should at least define customer data items, to ensure that the customer
and developers use the same definition and terminologies.
• Entity-Relationship Diagrams: Another tool for requirement specification is the
entity-relationship diagram, often called an "E-R diagram." It is a detailed logical
representation of the data for the organization and uses three main constructs i.e.
data entities, relationships, and their associated attributes.
4. Software Requirement Validation:
• After requirement specifications developed, the requirements discussed in this
document are validated. The user might demand illegal, impossible solution or
experts may misinterpret the needs. Requirements can be the check against the
following conditions –
• If they can practically implement
• If they are correct and as per the functionality and specially of software
• If there are any ambiguities
• If they are full
• If they can describe
Requirements Validation Techniques
• Requirements reviews/inspections: systematic manual analysis of the
requirements.
• Prototyping: Using an executable model of the system to check
requirements.
• Test-case generation: Developing tests for requirements to check
testability.
• Automated consistency analysis: checking for the consistency of
structured requirements descriptions.
Software Requirement Management:
• Requirement management is the process of managing changing
requirements during the requirements engineering process and system
development.
• New requirements emerge during the process as business needs a
change, and a better understanding of the system is developed.
• The priority of requirements from different viewpoints changes during
development process.
• The business and technical environment of the system changes during
the development.
Prerequisite of Software requirements
• Collection of software requirements is the basis of the entire software
development project. Hence they should be clear, correct, and
well-defined.
A complete Software Requirement Specifications should be:
• Clear
• Correct
• Consistent
• Coherent
• Comprehensible
• Modifiable
• Verifiable
• Prioritized
• Unambiguous
• Traceable
• Credible source
Software Requirements: Largely software requirements must be
categorized into two categories:
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.
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. Functional
requirements specify the expected behavior of the system-which outputs should be
produced from the given inputs. They describe the relationship between the input
and output of the system. For each functional requirement, detailed description all
the data inputs and their source, the units of measure, and the range of valid inputs
must be specified.
Interface Requirements
• In this, software interfaces which mean how software program communicates with
each other or users either in form of any language, code, or message are fully
described and explained. Examples can be shared memory, data streams, etc.
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.
The performance requirements part of an SRS specifies the performance constraints
on the software system. All the requirements relating to the performance
characteristics of the system must be clearly specified. There are two types of
performance requirements: static and dynamic. Static requirements are those that do
not impose constraint on the execution characteristics of the system. Dynamic
requirements specify constraints on the execution behaviour of the system.
Design Constraints
• In this, constraints which simply means limitation or restriction are specified and
explained for design team. Examples may include use of a particular algorithm,
hardware and software limitations, etc. There are a number of factors in the client’s
environment that may restrict the choices of a designer leading to design
constraints such factors include standards that must be followed resource limits,
operating environment, reliability and security requirements and policies that may
have an impact on the design of the system. An SRS should identify and specify all
such constraints.
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.
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.
Appendices
• In this, additional information like references from where
information is gathered, definitions of some specific terms,
acronyms, abbreviations, etc. are given and explained.
Uses of SRS document
• Development team require it for developing product according
to the need.
• Test plans are generated by testing group based on the
describe external behaviour.
• Maintenance and support staff need it to understand what the
software product is supposed to do.
• Project manager base their plans and estimates of schedule,
effort and resources on it.
• customer rely on it to know that product they can expect.
• As a contract between developer and customer.
• in documentation purpose.
Conclusion
• Software development requires a well-structured Software
Requirement Specification (SRS). It helps stakeholders
communicate, provides a roadmap for development teams,
guides testers in creating effective test plans, guides
maintenance and support employees, informs project
management decisions, and sets customer expectations. The
SRS document helps ensure that the software meets functional
and non-functional requirements, resulting in a quality product
on time and within budget.
Data Flow Diagrams
• A Data Flow Diagram (DFD) is a traditional visual representation of the
information flows within a system. A neat and clear DFD can depict the
right amount of the system requirement graphically. It can be manual,
automated, or a combination of both.
• It shows how data enters and leaves the system, what changes the
information, and where data is stored.
• The objective of a DFD is to show the scope and boundaries of a system as
a whole. It may be used as a communication tool between a system analyst
and any person who plays a part in the order that acts as a starting point for
redesigning a system. The DFD is also called as a data flow graph or
bubble chart.
Data Flow Diagrams
The following observations about DFDs are essential:
• All names should be unique. This makes it easier to refer to elements in the
DFD.
• Remember that DFD is not a flow chart. Arrows is a flow chart that represents
the order of events; arrows in DFD represents flowing data. A DFD does not
involve any order of events.
• Suppress logical decisions. If we ever have the urge to draw a diamond-shaped
box in a DFD, suppress that urge! A diamond-shaped box is used in flow charts
to represents decision points with multiple exists paths of which the only one is
taken. This implies an ordering of events, which makes no sense in a DFD.
• Do not become bogged down with details. Defer error conditions and error
handling until the end of the analysis.
Standard symbols for DFDs are derived from the electric
circuit diagram analysis and are shown in fig:
Standard symbols for DFDs are derived from the
electric circuit diagram analysis
• Circle: A circle (bubble) shows a process that transforms data inputs into data
outputs.
• Data Flow: A curved line shows the flow of data into or out of a process or
data store.
• Data Store: A set of parallel lines shows a place for the collection of data
items. A data store indicates that the data is stored which can be used at a later
stage or by the other processes in a different order. The data store can have an
element or group of elements.
• Source or Sink: Source or Sink is an external entity and acts as a source of
system inputs or sink of system outputs.
Levels in Data Flow Diagrams (DFD)
• The DFD may be used to perform a system or software at any level of
abstraction. Infact, DFDs may be partitioned into levels that represent increasing
information flow and functional detail. Levels in DFD are numbered 0, 1, 2 or
beyond. Here, we will see primarily three levels in the data flow diagram, which
are: 0-level DFD, 1-level DFD, and 2-level DFD.
1) 0-level DFDM
• It is also known as fundamental system model, or context diagram represents the
entire software requirement as a single bubble with input and output data
denoted by incoming and outgoing arrows.
• Then the system is decomposed and described as a DFD with multiple bubbles.
• Parts of the system represented by each of these bubbles are then decomposed
and documented as more and more detailed DFDs.
• This process may be repeated at as many levels as necessary until the program at
hand is well understood.
• It is essential to preserve the number of inputs and outputs between levels, this
concept is called leveling by DeMacro.
• Thus, if bubble "A" has two inputs x1 and x2 and one output y, then the expanded
DFD, that represents "A" should have exactly two external inputs and one
external output as shown in fig:
1) 0-level DFDM
• The Level-0 DFD, also called context diagram
of the result management system is shown in
fig. As the bubbles are decomposed into less
and less abstract bubbles, the corresponding
data flow may also be needed to be
decomposed.
• 1-level DFD
• In 1-level DFD, a context diagram is decomposed into multiple
bubbles/processes. In this level, we highlight the main objectives of the
system and breakdown the high-level process of 0-level DFD into
subprocesses.
2-Level DFD
• 2-level DFD goes one process deeper into parts of 1-level DFD. It can be used
to project or record the specific/necessary detail about the system's
functioning.
Feasibility Analysis
• Feasibility Study in Software Engineering is a study to evaluate feasibility of
proposed project or system.
• Feasibility study is one of stage among important four stages of Software
Project Management Process.
• As name suggests feasibility study is the feasibility analysis or it is a measure
of the software product in terms of how much beneficial product development
will be for the organization in a practical point of view.
• Feasibility study is carried out based on many purposes to analyze whether
software product will be right in terms of development, implantation,
contribution of project to the organization etc.
Types of Feasibility Study
• The feasibility study mainly concentrates on below five mentioned areas.
Among these Economic Feasibility Study is most important part of the
feasibility analysis and Legal Feasibility Study is less considered feasibility
analysis.
1. Technical Feasibility: In Technical Feasibility current resources both
hardware software along with required technology are analyzed/assessed to
develop project. This technical feasibility study gives report whether there
exists correct required resources and technologies which will be used for
project development. Along with this, feasibility study also analyzes technical
skills and capabilities of technical team, existing technology can be used or
not, maintenance and up-gradation is easy or not for chosen technology etc.
2. Operational Feasibility: In Operational Feasibility degree of providing
service to requirements is analyzed along with how much easy product will
be to operate and maintenance after deployment. Along with this other
operational scopes are determining usability of product, Determining
suggested solution by software development team is acceptable or not etc.
Types of Feasibility Study
3. Economic Feasibility: In Economic Feasibility study cost and benefit of
the project is analyzed. Means under this feasibility study a detail analysis
is carried out what will be cost of the project for development which
includes all required cost for final development like hardware and
software resource required, design and development cost and operational
cost and so on. After that it is analyzed whether project will be beneficial
in terms of finance for organization or not.
1) Hardware cost –
Hardware cost includes actual purchase and peripherals (external devices)
that are connected to computer. For example, printer, disk drive etc. Actually,
finding actual cost of hardware is generally more difficult especially, when
system is shared by various users so as to compared to a system which
dedicated stand alone . In some case, best way is to treat it as operating cost.
2) Personnel costs –
Personnel costs includes EDP staff salaries and benefits as well as pay for
those who are involved in process of development of system. Cost occurred
during development of system which are one time costs and are also called
development cost. Once system is installed, cost of operating and maintaining
system becomes recurring cost that one has to pay very frequently based on
requirement.
3) Facility cost –
Facility cost is amount of money that is spent in preparation of a site that is
physical where application or computer will be in operation. This includes
wiring, flooring, lighting and air conditioning. These costs are treated as one-
time costs and are included into overall cost estimate of candidate system.
4) Operating costs –
These includes all costs associated with day-to-day(everyday) operation of
system and amount depends on number of shifts, nature of applications. There
are various ways of covering operating costs. One approach is to treat
operating costs as an overhead. Another approach is to charge money from
each authorized user for amount of processing they require from system.
Amount charged is based on computer time or time they spend on system, staff
time ad volume of output produced .
5) Supply costs –
Supply cost are variable costs that increase with increased use of paper, disks
and like. They should be estimated and included in overall cost of system.
• A system is also expected to provide health benefits. First task is to
identify each benefit and then assign some value to it for purpose of cost/
benefit analysis. Benefits may be tangible and intangible, direct or
indirect.
• Two major benefits are improving performance and minimizing cost of
processing of system.
• The performance category emphasizes improvement in accuracy of or
access to information and easier access to system by authorized users.
• Minimizing costs through an efficient system – error control or reduction
of staff- is a benefit that should be measured and included in cost/benefit
analysis.
• 1. Actors:
• Customer
• Admin
• 2. Use Cases:
• Browse Products
• Add to Cart
• Checkout
• Manage Inventory (Admin)
• 3. Relations:
• The Customer can browse products, add to the cart, and
complete the checkout.
• The Admin can manage the inventory.
Requirement Analysis Model/Elements
of Requirement Model
• Requirements modelling in software engineering identifies the
requirements that a software application or system must meet
in order to solve the business problem. Requirements are
divided into functional (what the system will have to do) and
non-functional (constraints within which the system will have
to perform).
• Their are common types that make up a requirement model are
Scenario-based model, Class-based model, Behavioural model
and Flow oriented Model.
• The different modeling technique is individually
understandable. However, it is highly important to know how
to use these models and when to use them.
Requirement Analysis
• Requirement Analysis is significant and essential activity after
elicitation.
• This activity reviews all requirements and may provide a
graphical view of the entire system.
• After the completion of the analysis the understandability of
the project may improve significantly
Requirement Analysis Model
1) Scenario based Modelling/Element
• User Stories
• Use Case Diagram
• Activity Diagram
2 )Class Based Modelling/Element
• Class Diagram
• Collaboration Diagram
3) Behavioural Based Modelling/Element
• State Transition Diagram
• Sequence Diagram
4) Flow Based Modelling/Element
• Data Flow Diagram
• Control Flow Diagram
1) Scenario based Modelling/Element
1)Use Case Diagram
• A Use Case Diagram is a vital tool in system design, it provides
a visual representation of how users interact with a system.
2. Actors: In the collaboration diagram, the actor plays the main role as it invokes the interaction. Each
actor has its respective role and name. In this, one actor initiates the use case.
3. Links: The link is an instance of association, which associates the objects and actors. It portrays a
relationship between the objects through which the messages are sent. It is represented by a solid
line. The link helps an object to connect with or navigate to another object, such that the message
flows are attached to links.
4. Messages: It is a communication between objects which carries information and includes a sequence
number, so that the activity may take place. It is represented by a labeled arrow, which is placed near
a link. The messages are sent from the sender to the receiver, and the direction must be navigable in
that particular direction. The receiver must understand the message.
2) Collaboration Diagram
3) Behavioural Based Modelling/Element
• Initial State –
• Final State –
• Simple State –
• Composite State –
1)State Transition Diagram
Type of State Description
In a System, it represents Starting
Initial State
state.
In a System, it represents Ending
Final State
state.
In a System, it represents a Simple
Simple State
state with no substructure.
2. Actors
• An actor in a UML diagram represents a
type of role where it interacts with the
system and its objects. It is important to
note here that an actor is always outside
the scope of the system we aim to model
using the UML diagram.
3. Activation
• It is represented by a thin rectangle on the
lifeline. It describes that time period in
which an operation is performed by an
element, such that the top and the
bottom of the rectangle is associated with
the initiation and the completion time,
each respectively.
Messages
The messages depict the interaction between the objects and are represented by
arrows. They are in the sequential order on the lifeline. The core of the sequence
diagram is formed by messages and lifelines.
Following are types of messages enlisted below:
• It shows how data enters and leaves the system, what changes the
information, and where data is stored.
• 2. While
• 3. do-while
• 4. for
Example
• if A = 10 then
• if B > C
• A=B
• else A = C
• endif
• print A, B, C
• Flowchart of above
example will be:
• Control Flow Graph of above example will be:
Advantage of CFG
• There are many advantages of a control flow graph.
• It can easily encapsulate the information per each
basic block.
• It can easily locate inaccessible codes of a program
and syntactic structures such as loops are easy to find
in a control flow graph.