4.software Project Estimation
4.software Project Estimation
4.software Project Estimation
Unit 4
Objectives
• To introduce the fundamentals of software costing and
pricing
• To describe three metrics for software productivity
assessment
• To explain why different techniques should be used for
software estimation
• To describe the principles of the COCOMO 2
algorithmic cost estimation model
Project Management is an integrated part of software development.
The project manager must decide which process model is appropriate for:
The customer who have requested the product
The characteristics of the product itself, and
The projcect environment in which the s/w team works.
The Project
In order to manage successful s/w projects, we must understand what
can go wrong and how to do it right. Ten signs that indicate the project is
in danger:
Drawbacks:
It is defined on code. For example it can’t measure
the size of specification.
It characterize only one specific view of size, name
length, it takes no account of functionality or
complexity.
Bad s/w design may cause excessive line of code
It is language dependent.
In this example we have:
1 Physical Line of Code (LOC)
2 Logical Lines of Code (LLOC) (for statement
and printf statement)
1 comment line
• Advantages
• Easily counted
• Many existing methods use LOC as key input.
• Disadvantages
• Depend upon programming language
• Difficult in early stage
Function point (FP)
• Function oriented metrics focus on program
"functionality" or "utility".
• Productivity = FP / person-month
Quality = defects / FP
Cost = $ / FP
Documentation = pages of documentation / FP
Project Cost Estimation Approach
• Basic activity in project planning and
measurement.
• Three categories
1. Heuristic technique
2. Empirical technique
3. Analytical technique
Heuristic technique
Disadvantages:
• Human error, considering not all factors and aspects of the
project, individual bias, more chances of failure.
• Estimation by group of experts minimizes factors such as
individual oversight, lack of familiarity with a particular
aspect of a project, personal bias and desired to win a
contract through overly optimistic estimate.
Delphi cost estimation
Experts Group
Estimation
E By
Coordinators
• Halstead Program Length – The total number of operator occurrences and the total
number of operand occurrences.
N = N1 + N2
And
• estimated program length is, N = n1log2n1 + n2log2n2
• Halstead Vocabulary – The total number of unique operator and unique operand
occurrences.
n = n1 + n2
• Program Volume – Proportional to program size, represents the size, in bits, of space
necessary for storing the program. Minimum number of bits needed to encode program.
• V = Size * (log2 vocabulary)
= N * log2(n)
Counting rules for C language –
• Comments are not considered.
• The identifier and function declarations are not considered
• All the variables and constants are considered operands.
• Global variables used in different modules of the same program are counted as
multiple occurrences of the same variable.
• Local variables with the same name in different functions are counted as
unique operands.
• Functions calls are considered as operators.
• All looping statements e.g., do {…} while ( ), while ( ) {…}, for ( ) {…}, all control
statements e.g., if ( ) {…}, if ( ) {…} else {…}, etc. are considered as operators.
• In control construct switch ( ) {case:…}, switch as well as all the case statements
are considered as operators.
• The reserve words like return, default, continue, break, sizeof, etc., are
considered as operators.
• All the brackets, commas, and terminators are considered as operators.
• GOTO is counted as an operator and the label is counted as an operand.
• The unary and binary occurrence of “+” and “-” are dealt separately. Similarly
“*” (multiplication operator) are dealt separately.
main()
{
int a, b, c, avg;
scanf("%d %d %d", &a, &b, &c);
avg = (a + b + c) / 3;
printf("avg = %d", avg);
}
- Introduction
- Risk identification
- Risk projection (estimation)
- Risk mitigation, monitoring, and
management
3-Customer risks associated with sophistication of the customer and the developer's ability to
characteristics communicate with the customer in a timely manner
4-Process risks associated with the degree to which the software process has been defined
definition and is followed
5-Development risks associated with availability and quality of the tools to be used to build the
environment project
6-Technology to risks associated with complexity of the system to be built and the "newness" of
be built the technology in the system
7-Staff size and risks associated with overall technical and project experience of the software
experience engineers who will do the work
Recording Risk Information
Project: Embedded software for XYZ system
Risk type: schedule risk
Priority (1 low ... 5 critical): 4
Risk factor: Project completion will depend on tests which
require
hardware component under development. Hardware
component
delivery may be delayed
Probability: 60 %
Impact: Project completion will be delayed for each day that
hardware is unavailable for use in software testing
Monitoring approach:
Scheduled milestone reviews with hardware group
Contingency plan:
Modification of testing strategy to accommodate delay
using
software simulation
Estimated resources: 6 additional person months beginning
7-1-96
Questionnaire on Project Risk
(Questions are ordered by their relative importance to project success)
Semi-detached –
Intermediate projects in which team with mixed experience level.
Mix of rigid and less than rigid requirements
Embedded –
A software project with requiring the highest level of complexity,
creativity, and experience requirement
Types of Models
• COCOMO consists of a hierarchy of three
increasingly detailed and accurate forms. Any
of the three forms can be adopted according
to our requirements. These are types of
COCOMO model:
– Basic COCOMO Model
– Intermediate COCOMO Model
– Detailed COCOMO Model
Basic COCOMO
• Use Only Lines of code
• Equations are
Intermediate COCOMO
• Intermediate COCOMO takes these Cost
Drivers into account
• Addition to basic cocomo , various other
factors such as reliability, experience,
Capability includes in Intermediate COCOMO.
• These factors are known as Cost Drivers and
the Intermediate Model utilizes 15 such
drivers for cost estimation.
The effort calculation:
E = a * (KLOC)b * EAF (person-months)
D= c*(E)d
P=E/D
Where,
E- Effort applied in person-months
D – Development time in duration-in-month (use c and d coefficient
from basic model)
P- Total number of persons required to accomplish the project
KLOC ... kilo lines of code
a, b, c, d depend on the project type
Detailed COCOMO Model –
Effort= A*sizeB *M
• Computer attributes
• Constraints imposed on the software by the hardware platform.
• Personnel attributes
• Multipliers that take the experience and capabilities of the people
working on the project into account.
• Project attributes
• Concerned with the particular characteristics of the software
development project.
Product Factors RELY- Required Software Reliability