Function points

advertisement
CSC 395 –
Software Engineering
Lecture 33:
Planning & Estimation
-orHow Much for the
Program using Windows
Estimating Duration & Cost

Accurate estimations crucial



Companies need to make $$$
Customers want reasonable & reliable prices
Estimates depends on many, many variables





Many are unpredictable (e.g., human factors)
Programmers quit or “get hit by bus”
Get freak Oct. snow storm that shuts down city
Programmer pairs differ in effectiveness &
productivity (up to 28x)
General models impossible to create
Planning and Process

Estimates improve as more details known

Anyone confused by this point, give up
Planning and Process


Properly engineered, estimate stays static as
range shrinks
Start of requirements, estimate is $1 million


After requirements, estimate stays $1 million


Likely actual cost is in $0.25M - $4M range
Actual cost range shrunk to $0.5M - $2M
After analysis, estimate still $1 million


But cost range reduced to $0.67M - $1.5M
This is also when contract is finalized!
Estimating Product’s End Size

Several metrics commonly relied upon



Includes “fudge factors” that can be tweaked




Use measurable quantities for simple calculations
Computed early in life cycle for use writing contracts
Factor unique to each group and situation
Tracking allows more precise estimates over time
FFP for medium-sized data processing projects
Function points used in many places
FFP Calculation



Counts files (Fi), flows (Fl), & processes (Pr)
Size (S) estimated as
S = Fi + Fl + Pr
Cost (C) estimated with S & efficiency factor b
C=bS
Function Points Metric


Expressed in units of “function points”
Calculated using several inputs:





Number of inputs (Inp)
Number of outputs (Out)
Number of Inquiries (Inq)
Count of master files (Maf)
Interfaces in system (Inf)
FP = 4 • Inp + 5 • Out + 4 • Inq + 10 • Maf + 7 • Inf
Complex FP Calculation
1.
Classify each of the individual components
(e.g., each Inp, Out, Inq, Maf, Inf)
Assign appropriate number of function points
 Sum is UFP (unadjusted function points)

Complex FP Calculation
2.
Compute DI (degree of influence)


Sum of 14 factors ratings
Each rating will be integer between
0 (“not present”) &
5 (“strong influence throughout”)
Complex FP Calculation
3.
4.
Compute TCF (total complexity factor)
TCF = 0.65 + 0.01  DI
FP (number of function points) is:
FP = UFP  TCF
Analysis of Metrics

Amazingly, FP often calculated correctly


Moreover, cost-per function point meaningful!
Maintenance can cause inaccuracies

Major changes possible without changing Fi, Fl,
Pr, Inp, Out, Inq, Maf, Inf
Cost Estimation Techniques

Expert judgment by analogy




Bottom-up approach



Compare target product to completed products
Provides a WASG (wild *** scientific guess)
Studies show large groups eerily accurate
Split into smaller components (e.g., classes)
Estimate costs for each component
Algorithmic cost estimation models

Most commonly used approach
COCOMO

Set of estimation models developed in 1981



Updated in 1995 for modern development tools
Both contain 3 models differing in complexity
Original design consists of three models:



Macro-estimation model for whole product
Intermediate COCOMO
Micro-estimation model examining product details
Intermediate COCOMO

Estimate product length in KDSI


Estimate of 1000s of source instructions
Select development mode
Size
Innovation
Deadline
Environment
Small
Little
Not tight
Stable
Semi-detached Medium
Medium
Medium
Medium
Embedded
Greater
Tight
Complex interfaces
Organic

Large
Development mode determines coefficients used
a
b
Organic
3.2
1.05
Semi-detached
3.0
1.12
Embedded
2.8
1.20
Intermediate COCOMO

Compute development (nominal) effort


Effort = a  (KDSI)b
Compute C (effort adjustment factor)


Effort computed as person-months
Equals the product of up to 15 cost-drivers
Development time (in person-months) is:
Effort  C
COCOMO Cost Drivers
Using COCOMO

Revision (COCOMO II) calculated similarly


Estimated time then used to compute:




But much, much more complex
Development costs & schedules
Phase and activity distributions
Maintenance costs after delivery
Ultimately based upon initial size estimate

End result only as good as initial estimate
For Next Lecture

Consider maintenance of code




Ultimately where the real money is made or lost
Where majority of time in project is spent
But least interesting for software engineering
Much determined by decisions in development
Download