Numericals Metrics
Numericals Metrics
Features :
• Variations such as “source lines of code”, are used to set out a codebase.
• LOC is frequently used in some kinds of arguments.
• They are used in assessing a project’s performance or efficiency.
Advantages :
• Most used metric in cost estimation.
• Its alternates have many problems as compared to this metric.
• It is very easy in estimating the efforts.
Disadvantages :
• Very difficult to estimate the LOC of the final program from the problem specification.
• It correlates poorly with quality and efficiency of code.
• It doesn’t consider complexity.
void main() void selSort(int x[], int n) {
{ //Below function sorts an array in ascending order
int fN, sN, tN; int i, j, min, temp;
cout << "Enter the 2 integers: "; // Loop
cin >> fN >> sN; for (i = 0; i < n - 1; i++) {
// sum of two numbers in stored in variable sum min = i;
sum = fN + sN; //Nested Loop
// Prints sum for (j = i + 1; j < n; j++)
cout << fN << " + " << sN << " = " << sum; if (x[j] < x[min])
return 0; min = j;
} temp = x[i];
LoC= 11 or 9 x[i] = x[min];
x[min] = temp;
}
}
LoC= ?
Function point metrics
• Introduce by Alan Albrecht while working for IBM in1970s
• This metric overcomes the shortcoming of the LOC metric.
• In LOC metric size can be determine accurately only after the product
has fully been developed but in function point size can be determine
directly from program specification.
• Here the size of a software product is directly dependent on the
number of different function or features it supported. It also depend
on the number of the file and the interfaces.
• It is certain that a product support many features is larger in size than
a product with few features.
Steps to compute function point
• Beside using the number of the input and output data values function
point metric computes the size of a software product (in unit of
function points or FPs).
• The steps for computing function point-
• Count the number of functions of each proposed type.
• Compute the Unadjusted Function Points(UFP) (Using Table)
Step-2:
Calculate Complexity Adjustment Factor (CAF).
CAF = 0.65 + ( 0.01 * F ) Step-4: Calculate Function Point.
FP = UFP * CAF
Given the following values, compute function point when all complexity adjustment
factor (CAF) and weighting factors are average.
User Input = 50
User Output = 40
User Inquiries = 35
User Files = 6
External Interface = 4
Step-1: As complexity adjustment factor is average (given in question),
hence, scale = 3.
F = 14 * 3 = 42
Step-2:
CAF = 0.65 + ( 0.01 * 42 ) = 1.07
Step-3: As weighting factors are also average (given in question) hence we will
multiply each individual function point to corresponding values in TABLE.
UFP = (50*4) + (40*5) + (35*4) + (6*10) + (4*7) = 628
Step-4:
Function Point = 628 * 1.07 = 671.96
Example
• Example: Compute the function point, productivity, documentation,
cost per function for the following data:
• Number of user inputs = 24
• Number of user outputs = 46
• Number of inquiries = 8
• Number of files = 4
• Number of external interfaces = 2
• Effort = 36.9 p-m
• Technical documents = 265 pages
• User documents = 122 pages
• Cost = $7744/ month
• Various processing complexity factors are: 4, 1, 0, 3, 3, 5, 4, 4, 3, 3,
2, 2, 4, 5.
• Assume weighing factor is high.
Solution
Software Project Cost Estimation
• Dr. Barry Boehm suggested that any software development project can be
classified into one of the following three categories based on the development
complexity: organic, semidetached, and embedded.
• Organic, Semidetached and Embedded software projects
• Organic (application): If the project deals with developing a well understood
application program, the size of the development team is reasonably small, and
the team members are experienced in developing similar types of projects. (e.g.
Management systems)
• Semidetached (utility): If the development consists of a mixture of experienced
and inexperienced staff. Team members may have limited experience on related
systems but may be unfamiliar with some aspects of the system being developed.
(e.g. Innovative projects )
• Embedded (system): If the software being developed is strongly coupled to
complex hardware, or if the stringent regulations on the operational procedures
exist. (e.g. robotics, ATM, aircraft, robotic arms)
COCOMO
Solution for 1:
Development effort
DE=ab(KLOC)bb
2.4(20)1.05 = 55.75 pm
Development duration
DD=cb(Effort)db
2.5(55.75)0.38 = 11.52
Based on the probability and projected costs, the lowest expected cost is the
"buy" option.