Unit 1 Chapter 2
Unit 1 Chapter 2
UNIT-1
Chapter-2
(SOFTWARE REQUIREMENTS)
Experienced developers take considerable time to understand the exact
requirements of the customer and to meticulously document those. They know
that without a clear understanding of the problem and proper documentation of
the same, it is impossible to develop a satisfactory solution.
The requirements analysis and specification phase starts after the feasibility
study stage is complete and the project has been found to be financially viable and
technically feasible.
The requirements analysis and specification phase ends when the requirements
specification document has been developed and reviewed. The requirements
specification document is usually called as the software requirements
specification (SRS) document. The goal of the requirements analysis and
specification phase can be stated in a nutshell as follows.
The complete set of requirements are almost never available in the form of a
single document from the customer. In fact, it would be unrealistic to expect the
customers to produce a comprehensive document containing a precise
description of what he wants. Further, the complete requirements are rarely
obtainable from any single customer representative. Therefore, the
requirements have to be gathered by the analyst from several sources in bits
and pieces.
We can conceptually divide the requirements gathering and analysis activity into
two separate tasks:
• Requirements gathering
• Requirements analysis
Requirements Gathering
Typically even before visiting the customer site, requirements gathering activity is
started by studying the existing documents to collect all possible information
about the system to be developed.
During visit to the customer site, the analysts normally interview the end-users
and customer representatives, carry out requirements gathering activities such
as questionnaire surveys, task analysis, scenario analysis, and form analysis.
Requirements Analysis
During requirements analysis,the analyst needs to identify and resolve three main
types of problems in the requirements:
• Anomaly
• Inconsistency
• Incompleteness
• Draw the context diagram: The context diagram is a simple model that
defines the boundaries and interfaces of the proposed systems with the
external world. It identifies the entities outside the proposed system that
interact with the system. The context diagram of student result management
system is given below:
Development of a Prototype (optional): One effective way to find out what the
customer wants is to construct a prototype, something that looks and preferably acts
as part of the system they say they want.
We can use their feedback to modify the prototype until the customer is
satisfied continuously. Hence, the prototype helps the client to visualize the
proposed system and increase the understanding of the requirements. When
developers and users are not sure about some of the elements, a prototype may help
both the parties to take a final decision.
Finalise the requirements: After modeling the requirements, we will have a better
understanding of the system behavior. The inconsistencies and ambiguities have
been identified and corrected. The flow of data amongst various modules has been
analyzed. Elicitation and analyze activities have provided better insight into the
system. Now we finalize the analyzed requirements, and the next step is to
document these requirements in a prescribed format.
After the analyst has gathered all the required information regarding the software
to be developed, and has removed all incompleteness, inconsistencies, and
anomalies from the specification, he starts to systematically organise the
requirements in the form of an SRS document. The SRS document usually
contains all the user requirements in a structured though an informal form.
Among all the documents produced during a software development life cycle, SRS
document is probably the most important document and is the toughest to
write. One reason for this difficulty is that the SRS document is expected to cater
to the needs of a wide variety of audience.
meet their needs. Remember that the customer may not be the user of the
software, but may be some one employed or designated by the user.
The skill of writing a good SRS document usually comes from the experience
gained from writing SRS documents for many projects. However, the analyst
should be aware of the desirable qualities that every good SRS document should
possess. IEEE Recommended Practice for Software Requirements
Specifications[IEEE830] describes the content and qualities of a good software
requirements specification (SRS). Some of the identified desirable qualities of an
SRS document are the following:
• Concise: The SRS document should be concise and at the same time
unambiguous, consistent, and complete. Verbose and irrelevant
descriptions reduce readability and also increase the possibilities of errors in
the document.
• Implementation-independent: The SRS should be free of design and
implementation decisions unless those decisions reflect actual
requirements. It should only specify what the system should do and refrain
from stating how to do these. This means that the SRS document
should specify the externally visible behaviour of the system and not
discuss the implementation issues. This view with which a requirements
specification is written, has been shown in Figure 4.1.
Observe that in Figure 4.1, the SRS document describes the output produced
for the different types of input and a description of the processing required to
produce the output from the input
• Over-specification: It occurs when the analyst tries to address the “how to”
aspects in the SRS document. For example, in the library automation
problem, one should not specify whether the library membership records
need to be stored indexed on the member’s first name or on the library
member’s identification (ID) number. Over-specification restricts the
freedom of the designers in arriving at a good design solution.
• Forward references: One should not refer to aspects that are discussed much
later in the SRS document. Forward referencing seriously reduces
readability of the specification.
• Wishful thinking: This type of problems concern description of aspects
which would be difficult to implement.
• Noise: The term noise refers to presence of material not directly relevant to
the software development process. For example, in the register
customer function, suppose the analyst writes that customer registration
department is manned by clerks who report for work between 8am and
5pm, 7 days a week. This information can be called noise as it would hardly
be of any use to the software developers and would unnecessarily clutter
the SRS document, diverting the attention from the crucial points.
• Functional requirements
• Non-functional requirements
— Design and implementation constraints
— External interfaces required
— Other non-functional requirements
• Goals of implementation.
Functional requirements
Each function fi of the system can be considered as reading certain data ii, and
then transforming a set of input data (ii) to the corresponding set of output data
(oi). The functional requirements of the system, should clearly describe each
Prepared By: Er. Inderjeet Singh(e8822) Page 18
Software Engineering
functionality that the system would support along with the corresponding input
and output data set.
• Transaction Handling
• Business Rules
• Certification Requirements
• Reporting Requirements
• Administrative functions
• Authorization levels
• Audit Tracking
• External Interfaces
• Historical Data management
• Legal and Regulatory Requirements
Once all the high-level functional requirements have been identified and the
requirements problems have been eliminated, these are documented. A
function can be documented by identifying the state at which the data is to be
input to the system, its input data domain, the output data domain, and the type
of processing to be carried on the input data to obtain the output data.
Description: The withdraw cash function first determines the type of account
that the user has and the account number from which the user wishes to withdraw
cash. It checks the balance to determine whether the requested amount is
Prepared By: Er. Inderjeet Singh(e8822) Page 20
Software Engineering
Output: The requested cash and printed transaction statement. Processing: The
amount is debited from the user’s account if sufficient balance is available,
otherwise an error message displayed.
Non-functional requirements
• Portability
• Security
• Maintainability
• Reliability
• Scalability
• Performance
• Reusability
• Flexibility
Example:
N.1: Database: A data base management system that is available free of cost in
the public domain should be used.
N.2: Platform: Both Windows and Unix versions of the software need to be
developed.
Prepared By: Er. Inderjeet Singh(e8822) Page 22
Software Engineering
standard buttons and functions (e.g., help) that will appear on every screen,
keyboard shortcuts, error message display standards, and so on.
• Usability requirement
• Serviceability requirement
• Manageability requirement
• Recoverability requirement
• Security requirement
• Data Integrity requirement
• Capacity requirement
• Availability requirement
• Scalability requirement
• Interoperability requirement
• Reliability requirement
• Maintainability requirement
• Regulatory requirement
• Environmental requirement
Goals of implementation
The ‘goals of implementation’ part of the SRS document offers some general
suggestions regarding the software to be developed. These are not binding on the
developers, and they may take these suggestions into account if possible. For
example, the developers may use these suggestions while choosing among
different design solutions.
There are two main techniques available to analyse and represent complex
processing logic—decision trees and decision tables. Once the decision
making logic is captured in the form of trees or tables, the test cases to validate
these logic can be automatically obtained. It should, however, be noted that
decision trees and decision tables have much broader applicability than just
specifying complex processing logic in an SRS document.
Decision tree
A decision tree gives a graphic view of the processing logic involved in decision
making and the corresponding actions taken. Decision tables specify which
variables are to be tested, and based on this what actions are to be taken
depending upon the outcome of the decision making logic, and the order in which
decision making is performed.
The edges of a decision tree represent conditions and the leaf nodes
represent the actions to be performed depending on the outcome of testing the
conditions. Instead of discussing how to draw a decision tree for a given
processing logic, we shall explain through a simple example how to represent the
processing logic in the form of a decision tree.
name, address, and phone number. If proper information is entered, the software
should create a membership record for the new member and print a bill for the
annual membership charge and the security deposit payable.
If the renewal option is chosen, the LMS should ask the member’s name and his
membership number and check whether he is a valid member. If the member
details entered are valid, then the membership expiry date in the membership
record should be updated and the annual membership charge payable by the
member should be printed. If the membership details entered are invalid, an
error message should be displayed.
If the cancel membership option is selected and the name of a valid member is
entered, then the membership is cancelled, a choke for the balance amount due
to the member is printed and his membership record is deleted. The decision tree
representation for this problem is shown in Figure 4.3.
Advantages
• They can be useful with or without hard data, and any data requires minimal
preparation
Disadvantages
• Calculations can become complex when dealing with uncertainty and lots of
linked outcomes.
Decision table
A decision table shows the decision making logic and the corresponding actions
taken in a tabular or a matrix form. The upper rows of the table specify the
variables or conditions to be evaluated and the lower rows specify the actions to
be taken when an evaluation test is satisfied. A column in the table is called a
rule. A rule implies that if a certain condition combination is true, then the
corresponding action is executed.
The decision table for the LMS problem of Example 4.10 is as shown in Table 4.1.
Readability: Decision trees are easier to read and understand when the
number of conditions are small. On the other hand, a decision table causes the
analyst to look at every possible combination of conditions which he might
otherwise omit.
Explicit representation of the order of decision making: In contrast to the
decision trees, the order of decision making is abstracted out in decision
tables. A situation where decision tree is more useful is when multilevel
Formal Specification
Example: The level of rigor used should be tailored to fit the specific project w.r.t
System critical level, budget, schedule, technical environments
Syntactic domains
Semantic domains
Advantages:
Disadvantages:
Formal methods are usually classified into two broad categories—the so-called
model-oriented and the property-oriented approaches.
Data Modeling
• Data modelers often use multiple models to view the same data and ensure
that all processes, entities, relationships and data flows have been
identified.
• Data modeling stages roughly break down into creation of logical data
models that show specific attributes, entities and relationships among
entities and the physical data model.
Or
Hierarchical Model: The structure of the hierarchical model resembles a tree. The
remaining child nodes are arranged in a certain sequence, and there is only one root
node—or, alternatively, one parent node. However, the hierarchical approach is no
longer widely applied. approach connections in the actual world may be modelled
using this approach.
For Example , For example, in a college there are many courses, many professors
and students. So college became a parent and professors and students became its
children.
Network Model :We have a versatile approach to represent objects and the
relationships among these things thanks to the network model. One of its features
is a schema, which is a graph representation of the data. An item is stored
within a node, and the relationship between them is represented as an edge. This
allows them to generalise the maintenance of many parent and child records.
one to one
one to many
many to one
many to many
All arrows should be labeled in a DFD. The double line is used to represent data
store. There may be implicit procedure or sequence in the diagram but explicit
logical details are generally delayed until software design.
• Activity diagrams
• Interaction diagrams
• Use case diagrams
So, on some occurrence of a particular event, an action is taken and what action
needs to be taken is represented by State Transition Diagram.
Example :
Consider an Elevator. This elevator is for n number of floors and has n number of
buttons one for each floor.
Elevator‟s working can be explained as follows :
1. Elevator buttons are type of set of buttons which is there on elevator. For
reaching a particular floor you want to visit, “elevator buttons” for that
particular floor is pressed. Pressing, will cause illumination and elevator will
start moving towards that particular floor for which you pressed “elevator
buttons”. As soon as elevator reaches that particular floor,
illumination gets canceled.
2. Floor buttons are another type of set of buttons on elevator. If a person is on
a particular floor and he wants to go on another floor, then elevator button for
that floor is pressed. Then, process will be same as given above. Pressing, will
cause illumination and elevator to start moving, and when it reaches on
desired floor, illumination gets canceled.
3. When there is no request for elevator, it remains closed on current floor.
Prepared By: Er. Inderjeet Singh(e8822) Page 41
Software Engineering
Advantages :
Disadvantages :
This model does not have any theory, so trainee is not able to fully understand
basic principle and major concept of modeling.
This modeling cannot be fully automated.
Sometimes, it‟s not easy to understand overall result.
Does not achieve maximum productivity due to some technical issues or any
errors.
Structural Modelling
Modeling means creating a diagram for a system that includes identifying the
elements that are important to your particular module. The structural modeling
gives a structural view of a system that highlights the structure of the objects
including their classifiers, relationships, attributes and operations. These
elements form the vocabulary of the system you are modeling. For example, if you
are going to buy a car, things like wheels, frame size, color, lights, and engine are
some things that will be worthful to you in understanding about the car; these
things are properties of the car. In UML, all of these things are modelled as classes.
Cars have external and internal structure, only important properties of car are
visible and the rest are hidden. This feature is called abstraction. A class is an
abstraction of the things that are a part of your vocabulary. For creating a
structural model, you have to collect key data contained in the problem domain.
• Structural model represents the framework for the system and this
framework is the place where all other components exist.
• Hence, the class diagram, component diagram and deployment diagrams are
part of structural modeling.
• They all represent the elements and the mechanism to assemble them.
Classes
Relationships
Relationships define how classes communicate with each other. There are three
basic types of relationships in UML- Dependencies, Generalization and
Associations for connecting or communicating classes to each other.
As you can see in figure-2.5, vehicle class is super class or base or parent class and
Car, Bus are child class or sub class.
When you connect just two classes is called a binary association. Associations can
also have more than two classes, which will be known as n-ary associations. One
more form of association is called aggregation that specifies a whole-part
relationship between the aggregate (whole) and the component part. For
example, paragraph is part of word document. Each association can have a name,
role, multiplicity and aggregation.
Data Dictionary
Data Dictionary is the major component in the structured analysis model of the
system. It lists all the data items appearing in DFD. A data dictionary in Software
Engineering means a file or a set of files that includes a database‟s metadata (hold
records about other objects in the database), like data ownership, relationships of
the data to another object, and some other data. This article focuses on discussing
data dictionaries in detail.
3. It helps to ensure that everyone in the organization understands the data, how
it should be used, and how it should be managed.
1. Data Elements: This includes the attributes of the data element such as
Name, Description, Type, Length, Default Value, and Constraints.
7. Versioning and History: Version and History of the data element definition
are recorded.
9. Business Metadata: Business Rules and the Business Context in which the
data is used are included.
1. Define Scope and Objectives: This involves identifying the objective of the
data dictionary and the data elements it will cover.
5. Create and Enter Data in Data Dictionary: Use software tools to build the
data dictionary and enter the data.
6. Review and Validate: Ensure the accuracy and completeness of the data
dictionary.
7. Maintain and Update Regularly: Keep the data dictionary up to date with
ongoing updates and changes.
1. Data Consistency: Data dictionary ensures that all the elements are
consistently defined and used across the organization.
3. Support for Data Analytics: A Data dictionary offers detailed metadata that
helps analysts understand the context and meaning of the data they are
working with.
Data dictionaries are highly beneficial but they also come with certain limitations.
Here are some limitations of the data dictionary: