Unit - 2
S/W requirements Engineering & Planning Software Project
“A condition or capability needed by a user to solve a problem or achieve an objective” or “ The capability possessed by a system to satisfy a contract, standard, specification, or other formally imposed documents”.
When users request for software, they possess an approximation of what the new system should be capable of doing. Requirements differ from one user to another user and from one business process to another business process. Reliability means Operational reliability. It is described as the ability of a system or component to perform its required functions under static conditions for a specific period.it can also be described as the probability that a software system fulfils its assigned task in a given environment for a predefined number of input cases, assuming that the hardware and the input are free of error.
Software can be defined as a collection of programs, documentation and operating procedures. Institute of Electrical and Electronic Engineers (IEEE) defines software as “a collection of computer programs, procedures, rules, and associated documentation and data”.
Features of software:
Functionality: Refers to the degree of performance of the software against its intended purpose.
• Reliability: Refers to the ability of software to perform a required function under given conditions for a specified period.
• Usability: Refers the degree to which software is easy to use.
• Efficiency: Refers to the ability of software to use system resource in the most effective and efficient manner. • Maintainability: Refers to the ease with which a software system can be modified to add capabilities, improve system performance, or correct errors.
• Portability: Refers to the ease with which software developers can transfer software from one platform to another, without (or with minimum) changes
“Gathering software requirements is the foundation of the entire software development project. Hence they must be clear, correct and well-defined.”
Software Requirements Characteristics:
Type of requirements:
S/W requirements is a process in which users are encountered with different methods to get user requirements out of them.
Following are the steps for Requirement elicitation -
Importance of Requirement Analysis
Requirement analysis is significant and essential activity after elicitation. We analyse, refine, and scrutinize the gathered requirements to make consistent and unambiguous requirements. This activity reviews all requirements and may provide a graphical view of the entire system. After the completion of the analysis, it is expected that the understanding of the project may improve significantly. Here, we may also use the interaction with the customer to clarify points of confusion and to understand which requirements are more important than other.
Requirements Engineering and Specification
The process to gather the software requirements from client, analyse and document them is known as requirement engineering main goal of requirement engineering is to develop and maintain sophisticated and descriptive ‘System Requirements Specification’ document.
Requirement Engineering Process includes four steps:
a) Feasibility Study
b) Software Requirement Specification
c) Requirement Gathering
d) Software Requirement Validation
Feasibility study
When the client approaches the organization for getting the desired product developed, it comes up with rough idea about what all functions the software must perform and which all features are expected from the software. Referencing to this information, the analysts does a detailed study about whether the desired system and its functionality are feasible to develop.
This feasibility study is focused towards goal of the organization. This study analyses whether the software product can be practically materialized in terms of implementation, contribution of project to organization, cost constraints and as per values and objectives of the organization. It explores technical aspects of the project and product such as usability, maintainability, and productivity and integration ability.
The output of this phase should be a feasibility study report that should contain adequate comments and recommendations for management about whether or not the project should be undertaken.
Software Requirement Specification-
SRS is a document created by system analyst after the requirements are collected from various stakeholders. It defines how the intended software will interact with hardware, external interfaces, speed of operation, response time of system, portability of software across various platforms, maintainability, speed of recovery after crashing, Security, Quality, Limitations etc. The requirements received from client are written in natural language. It is the responsibility of system analyst to document the requirements in technical language so that they can be comprehended and useful by the software development team.
Requirement Gathering
If the feasibility report is positive towards undertaking the project, next phase starts with gathering requirements from the user. Analysts and engineers communicate with the client and end-users to know their ideas on what the software should provide and which features they want the software to include.
Software Requirement Validation
After requirement specifications are developed, the requirements mentioned in this document are validated. User might ask for illegal, impractical solution or experts may interpret the requirements incorrectly. This results in huge increase in cost if not nipped in the bud. Requirements can be checked against following conditions -
The software requirements document and SRS standards
The software requirements are description of features and functionalities of the target system. Requirements convey the expectations of users from the software product. The requirements can be obvious or hidden, known or unknown, expected or unexpected from client’s point of view.
Introduction to non-traditional Requirements
Requirements, which are not conventional are called non-traditional requirements.
Non-functional requirements include -
Software project management is an art and discipline of planning and supervising software projects. It is a sub-discipline of software project management in which software projects planned, implemented, monitored and controlled.
A software project manager is a person who undertakes the responsibility of executing the software project. Software project manager is thoroughly aware of all the phases of SDLC that the software would go through. Project manager may never directly involve in producing the end product but he controls and manages the activities involved in production.
Figure: Project planning activities
Software project management Measurement Metrics
Software measurement is a method to measure software characteristics which are measurable or countable with the help of metrics. Software metrics are used to measure software performance, planning work items, measuring productivity, and many other uses. Software metrics are similar to the four functions of management: Planning, Organization, Control, or Improvement.
To measures of various characteristics of the software, product metrics are used: on the basis of -
These metrics can be computed for different stages of SDLC.
b. Process Metrics:
To measures various characteristics of the software development process. For example, the efficiency of fault detection etc..
Responsibilities of project manager shoulders -
Managing People
Managing Project
Software measurement life cycle
Many other metrics include the following:
LOC Metrics- It is simplest size based metrics for calculating size of program. It is computed by normalizing the quality and productivity measures by considering the size of the product as a metric.
In size-oriented metrics:
b. Halstead's software science
In Halstead's "A code is an implementation of an algorithm considered to be a collection of tokens which can be classified as either operators or operand."
Token Count- All program metrics can be defined in basic symbols. These symbols are called as a token.
n1 = count of unique operators, n2 = count of unique operands.
N1 = count of total occurrences of operators. N2 = count of total occurrence of operands, size of the program can be expressed as N = N1 + N2.
Halstead metrics :
Program Volume (V)- The unit of measurement of volume is the standard unit for size "bits."
V=N*log2n
Program Level (L)- The value of L ranges between zero and one, with L=1 representing a program written at the highest possible level (i.e., with minimum size).
L=V*/V
Program Difficulty-The difficulty level or error-proneness (D) of the program is proportional to the number of the unique operator in the program.
D= (n1/2) * (N2/n2)
Programming Effort (E)- The unit of measurement of E is elementary mental discriminations.
E=V/L=D*V
Estimated Program Length-it is the length of a well-structured program is a function only of the number of unique operators and operands.
N=N1+N2
And estimated program length is denoted by N^
N^ = n1log2n1 + n2log2n2
The following alternate expressions have been published to estimate program length:
NJ = log2 (n1!) + log2 (n2!)
NB = n1 * log2n2 + n2 * log2n1
NC = n1 * sqrt(n1) + n2 * sqrt(n2)
NS = (n * log2n) / 2
Potential Minimum Volume- V* is defined as the volume of the most short program in which a problem can be coded.
V* = (2 + n2*) * log2 (2 + n2*), Here, n2* is the count of unique input and output parameters
Size of Vocabulary (n)-The size of the vocabulary of a program, which consists of the number of unique tokens used to build a program, is defined as:
n=n1+n2 where n=vocabulary of a program
n1=number of unique operators
n2=number of unique operands
Language Level – calculates algorithm implementation program language level. The same algorithm take extra effort if it is written in a low-level program language. Hence, it is easier to program in Pascal than in Assembler.
L' = V / D / D
lambda = L * V* = L2 * V
Project Estimation Techniques
For an effective management accurate estimation of various measures is a must. With correct estimation managers can manage and control the project more efficiently and effectively.
Project estimation may involve the following:
Software size may be estimated either in terms of KLOC (Kilo Line of Code) or by calculating number of function points in the software. Lines of code depend upon coding practices and Function points vary according to the user or software requirement.
The managers estimate efforts in terms of personnel requirement and man-hour required to produce the software. For effort estimation software size should be known. This can either be derived by managers’ experience, organization’s historical data or software size can be converted into efforts by using some standard formulae.
Once size and efforts are estimated, the time required to produce the software can be estimated. Efforts required is segregated into sub categories as per the requirement specifications and interdependency of various components of software. Software tasks are divided into smaller tasks, activities or events by Work Breakthrough Structure (WBS). The tasks are scheduled on day-to-day basis or in calendar months.
The sum of time required to complete all tasks in hours or days is the total time invested to complete the project.
This might be considered as the most difficult of all because it depends on more elements than any of the previous ones. For estimating project cost, it is required to consider -
Project Estimation Techniques
For an effective management accurate estimation of various measures is a must. With correct estimation managers can manage and control the project more efficiently and effectively.
Project estimation may involve the following:
Software size may be estimated either in terms of KLOC (Kilo Line of Code) or by calculating number of function points in the software. Lines of code depend upon coding practices and Function points vary according to the user or software requirement.
The managers estimate efforts in terms of personnel requirement and man-hour required to produce the software. For effort estimation software size should be known. This can either be derived by managers’ experience, organization’s historical data or software size can be converted into efforts by using some standard formulae.
Once size and efforts are estimated, the time required to produce the software can be estimated. Efforts required is segregated into sub categories as per the requirement specifications and interdependency of various components of software. Software tasks are divided into smaller tasks, activities or events by Work Breakthrough Structure (WBS). The tasks are scheduled on day-to-day basis or in calendar months.
The sum of time required to complete all tasks in hours or days is the total time invested to complete the project.
This might be considered as the most difficult of all because it depends on more elements than any of the previous ones. For estimating project cost, it is required to consider -
Project Size estimation Metrics
Estimation is done on behalf of number of line of codes in the software product.
b. Function Point (FP) based measures
Estimation is done on behalf of number of function points in the software product.
Quality Assurance plans
COCOMO
In the early 80’s, Barry Boehm developed a model called COCOMO (COnstructiveCOstMOdel) to estimate total effort required to develop the software project. COCOMO model is commonly used as it is based on the study of already developed software projects. While estimating total effort for a software project, cost of development, management, and other support tasks are included. However, cost of secretarial and other staff are excluded.
In this model, size is measured in terms of thousands of delivered lines of code (KDLOC). In order to estimate effort accurately, COCOMO model divides projects into three categories listed below:
Organic projects: These projects are small in size (not more than 50 KDLOC) andthus easy to develop. In organic projects, small teams with prior experience worktogether to accomplish user requirements, which are less demanding. Most people involved in these projects have thorough understanding of how the software under development contributes in achieving the organization objectives. Examples of organicprojects include simple business system, inventory management system, payrollmanagement system, and library management system.
Embedded projects: These projects are complex in nature (size is more than 300KDLOC) and the organizations have less experience in developing such type of projects. Developers also have to meet stringent user requirements. These software projects are developed under constraints (hardware, software, and people).
Examples of embedded systems include software system used in avionics and military hardware.
• Semi-detached projects: These projects are less complex as the user requirements are less stringent compared to embedded projects. The size of semi-detached project is not more than 300 KDLOC. Examples of semi-detached projects include operating system, compiler design, and database design
Types of Models:
Basic COCOMO can be used for quick and slightly rough calculations of Software Costs. Its accuracy is not very reliable.
Effort=a1*(KLOC) a2 PM
Tdev=b1*(efforts)b2 Months
Where KLOC is the estimated size of the software product indicate in Kilo Lines of Code,
a1,a2,b1, b2 are constants for each group of software products,
Tdev is the estimated time to develop the software, expressed in months,
Effort is the total effort required to develop the software product, expressed in person months (PMs).
Intermediate COCOMO takes Cost Drivers into account
Intermediate COCOMO equation:
E=ai (KLOC) bi*EAF
D=ci (E)di
EAF = Effort adjustment factor
A table for Coefficients for intermediate COCOMO is given below:
Detailed COCOMO additionally accounts for the influence of individual project phases, i.e in case of Detailed it accounts for both these cost drivers and also calculations are performed phase wise henceforth producing a more accurate result. The Six phases of detailed COCOMO are:
Planning and requirements
System structure
Complete structure
Module code and test
Integration and test
Cost Constructive model
Staffing Level Estimation
Project manager has to determine the actual Staff Estimation number after the effort required to develop a software is known.
Norden Estimation: Norden studied the Staffing patterns of R & D projects and proposed. Staffing level patterns can be approximated by "Rayleigh Distribution Curve" which specifies that the relationship between applied effort and delivery time for software project. It is also called Putnam- NORDEN-Rayleigh Curve or PNR curve.
In 1976, Putnam studied the problem of staffing of software projects observed that the level of effort required in software development efforts has a similar envelope.Putnam analysed a large number of projects, and gave the expression:
L=CkK1/3td4/3
K is the effort expended and L is the size in KLOC.
td is the time to develop the software.
Ck is the state of technology constant reflects factors that affect programmer productivity.
Risk management involves all activities pertaining to identification, analysing and making provision for predictable and non-predictable risks in the project. Risk may include the following:
Figure: 2 Risk Management Activities
Risk Management Process
There are following activities involved in risk management process: