Uploaded by Pradnya Patil

loc fp in SE

advertisement
a6padou\ )aJ
)s ti
dn
Lv'
^sNat.lvcngnd
ruoueJnseeu elPr lJoS !'Z
1v31NH33'l
g 6!l
uPar Pue
dlJI
oeads uo
- seuogale) oI
arBnllJos pue
arE
06
+
olttl palJlssPp eq uer
oTP^\IJOS JO
ue q
ol
]o s3lnqu$p amseaur 'qrllqe
luauernseaul aqJ
l{] os sssJold luaurdola,,lap
luauamsreur arPrlqtos
ruauelnsEall oJer uos
os sJuFur al8r4s uo snroJ +ou o'l
ipal+Iuro la8 deur srl4aul luelrodu4 laq+o lEql
arLL
'luaua^ordujl sserold earE aql qre4p elep srrJlaur
Jo
'arE.^llJOS
asn pue qeoB aql ]as
ueal arEMlJos puc ra€Eupru lralord
I
t
to sluPuruuetel
srolrP} ,{tqenb
aql roJ str4olrl Jo
q+l1l^ rar'llaSol
Ila^FralloJ'€
.Plep
pue esues uourlror asfl z
Srnpwls:aprm alq'r, d1$91suas leuoqeznreSro
to sPnpFIPul er{l as€ald ol srFlaru asn re^aN I
urpat ro slenpl^lpul eql ualearql o+
srr4_ai^l elErl^$os
- r*oloq ue'lr8 sP arE aseqJ a$anbpl
gt"l""Ilo' ro1 aur'1apm6 auros pa1sa8gns '{per5
are esaql sr-r4aut
sE
""n^lJot
o
Jo asn) luauuo4^ua luaurdola^ad
asn'sa€oloutf)al
ro
lsloot PalEurolne
^{au
suoFrpuot ssaursng o
(saFr ssarqsnq 'salJrlod PuoqpzruP8ro)
sruFur
F
3q1
E
: Moleq se pale
erP-Mtros
aql
e
aE^qlos aqt a^
'(Jadola^ap
srllqralJElellr Durolsn) o
puP lasn uaa^\lacl uoq€roqPflor pu? uoqe]runururoJ)
: se rPns suoqlPuot lEluauuo4^ua
saplsar alSuelr+ ssarord slqJ
aqt sallpads aPrr srqJ a{ p aql unllu
'l)nPord arE^{lJos
dtqenb pue scr
'
alE s)I4aul arer
'1ca{o,rd
are 4lJos alqEua
qcaldd Pue ssacdd )ol ssutahl
0'8
Softwarc EnEneenng
8-4
Let us discuss the metrics based on these approaches
Met.ics tar Prccess and
_
Size Oriented Metrics
.
Size.oriented measure
1s
produced.
derived by conside ng the size of software that
has been
Th€ organization builds a simple record of
size measure {or the sofh{are projects.
It js bult on past expefiences of organizations
It
.
rs a direct measure of soltware
Table 8.2.1 SEe measure
A simple set of size measure that call be developed is as
$vcn below
.
I
.
r
r
.
.
.
Size = Kilo Lines of Code (KLOC)
Effort = person/monrh
Productivjty = Kloc/person monrh
QL'ality = Number of
fautrs/Kloc
Cost = $/KLOC
Documentation = pages oI documentation/Kloc
The size measure is based on the lines o{ code computation
The lines of code is
defned as on€ iine oI text in a source file.
\,l,hile counting the lines of code rhe Simplesr Standard is
. Dorl't count blanl lines_
.
r
.
.
:
Don't count comments
Count e\-eryrhing else
The size
o
ented measure is not universally accepted method
Advantages
1 Artifact of software
dcvetopment which is easily couJtted.
2. Many existint merhods use LOC as a Key mpur.
3. A large body of tirerarure.and data based on LOC already
exisrs.
rEcHNtcAL puBLtcAlONS'- An ue ktud fat kno||ledgs
8-5
Softuvate Engtneenng
-
Meklcs tot Process entl P.alects
Disadvantages
1. This measure is dependent upon ihe programmrng language.
_
2. This method is well designed but shorrer program may get suffered_
3.
It
does not accommodate non procedural languages.
4. In early staSe of development it rs dilficult to estimate LOC.
Function Oriented Metrics
.
.
.
.
The oriented model is based on funclionality oI the delivered application
These are generally independent
of the programming language used
This method ls developed by Albrecht
in
1979
for IBM.IT uses luncLion pornts.
Function ponts are derived using :
1. Countable measures of the soffware requirements domain
2.
Assessments of the sofh^rare complexity
How to calculate function point ?
. The data for following inlormation domain characteristics are collected i
1. Number of user inputs Each user input which provides dislinct apphcalion
data to the software ls counted.
2.
Number of user outputs - Each user oufput thaf provides apphcation data to
the user is counted, e t, screens, reports, elror messates
3.
Number of user rnquiries An on-line input that results in the generatron ot
some rmmediate software r€sponse in the fom of an oufput.
4.
Number of files - Each logical master file, i.e. a logical groupint of data thar
may be part oI a database or a separate file.
5.
.
Number o{ extenal interfaces - AII machine-readable interfac€s that are useo ru
tansmit inJo ation to another system are counted
The organization needs to develop criteda whrch determine whether a palticular
entrv ir sjmple, dverage or comple\.
.
The weighfing factors should be determined by observations or by expe ments
fEcHNtcAL PUBL|CA|IONS An up thvst ta, knowledse
Metttcs far Prccess and Prolects
Saftware Engtneenng
So,?
Ad'
15
10
ltl
Dis
co{nt iotat
with the help of above given tabrc
The count table can b€ comPuied
questions'
be comPuted by ans$-erng following
the soffw'are comPl€xity can
values
are comPlexity adjustment
and recovety ?
f. l""r,f,t"-"V."In *ed reliab)e backup
2. Are daia communicahons reqldred ?
?
3. Are thcre distributed Processing functions
?
4. ls Performance of the system critical
?
heavj\' utillzed operational environment
existinS'
an
in
run
system
5- Wjll the
entry ?
6. Does ihe system requrre onlinc data
built over
the mPut transaction to be
7. Does the on_line data enty requrle
8.
9
?
multiPle screcns or oPerations
online ?
Are the master files uPdaied
mquides comPlex
Are the nputs, outPuts' files or
?
?
10 ls the mtemal processing complex
being reusable ?
11 Is the code which is designed
included in the design ?
12. Are conversion and installation
orSanizations ?
for multiPle mstalatons in different
13. Is the system designed
the user ?
change and ease of use by
tacilltate
to
designed
1,1. Is the aPPlication
following scale :
above factors according to the
nu*
"*t
oi,fl"
total x (0 65 + (0 01 x Sum (Fi))
Function Points (FP) = Count
No
.
Lncdental
Co
|l
S(
Signiiicant
ModeraLe
various measures as
calculated then we can comPute
is
lunchonal
the
Point
Once
follows
r
I
r
Productivitv = FP/Person-month
QuaLtY = Number of faults/FP
Pr
Cost = S/Fp
op
IEcHNtcALPUBLtcAnatls"' Ah
thtusl tat
kna
edqe
Software Engineeing
i:e.Is
MeLrics
8-7
far Process and PralecLs
Advantages
-
of Programminf' lanSuages1. This method is indePendent
be obtamed in earty siage of Ptoieci
based on the data lvhich can
I
2 lt
I
is
Disadvantages
1)
2)
S;
devcloped for that
business systems and can be
for
suitable
more
is
This method
are not validated
Many asPects of this meihod
vaL
meanmg lt is just a numerical
significant
no
has
poi"t
fft" iurl"rronut
e
.'.s oriented and funclion oriented metncs
Detwccl size
**-*--"-*-l
Compaflson between
odented metrics
Function
Fun(tion oriented
metric(
ented met':ics
oriented
Size o
.t
!
Sruda
ipq,lls I
othet
Ne
t'ttnctit
prciect
of req irement sPecificalian for ABC
r ).-^,r-. 11 filP.
t 7 illpuls' 1a o tputs' 6 inquities' 17 flLes
Points
dlttibltes are
has produced JollotLting
a|ld
tt1ld + external i1lh.r|flces'
catnplerit! dttd
nU
oJ law complerify
DeteftnieadjstedJnctiollpointsass|nningcomplexit!adjustfientvalwis32'
Solution : Given that :
7 inPuts
10 OutPuts
6 mquines
17 ftles
4 e\iemal irte'face'
complexit]'tor remantng
al1d extemal interfaces Low
Averag€ comPlexity for mputs
parametels
(Fi ) = 32
Adlusted firnction poini value t
fEcHNtCALPUBLtcAftaNs"
An up thtrsl hrt
kaa
eose
8A
Saftware Engineenng
.,
Metics for Pracess and Prajects
_ .Let us calcl ate count toiat value.
,
Measur€ment patameters
Count
,
\umber or user
,
Numbe. oI use,
7
t0
\urnnr
t
t7
I
rnputs
outptrrs
\!'\h. of rser r.rrriiie.
NL.rt,c, !i 1lie5
ol ertc ,,rl
tr\nTfi..i
weighting factor
X
X
X
X
X
4
4
I
-
28
40
rr
,
19
7
(orft ntii
23
l
2:l
Function polnt
= Couni toral x [0 65 + 0 0t x :(Fi)]
= 233x1065+001 x32l
= 233x[065+032]
= 233 x 097
FI' = 226 01
Hen., 'diu.rcd n ,- tornl ,22b.0t.
Attributes of Effective Soflware Metrics
The effcctive sofirvare merrics shol d have following athiburcs
1. Simple nnd computable - The derivarion oI mctric should be casv to compute and
should noi be a time consuming acti\rirv
2.
Empirically and intuitivety persuasive
- It
dern'cd based on obscrvarions
shoutd be immedlarc and can be
3. Consistent and objective - The metric should produce unambituous results
Anlbod,v sltould get the same result bl,using these metrics w,hen same set of
mtoimation is use.l
4. Consistent in its use of units and dimensions , The mathematical umts
and
dimensions uscd for the merric should be consistent. And there should not be
intermixinS of units
5. Proglanming language independenr
- l]]e
merric shoutd be based on anal)srs
Ir shoutd be nldependent o{
progaming languagcs, svntax or sem€nric of any programing langr1age
modcl, design mo.lel and program siructure.
IEC H
]CA
L PUBL] CAf DN S "
.,
8-12
Soflware Engineenng
-,
Mefics tat Process and Prcjects
1-ghange sizing
This approach is used when existing software has to be modified as per the
r_equirement o{ the project. The size of the software is ihen estimated by the mrnber and
q?e of reuse, addilion of code, change made n t}le cbde, del€tion of code.
. The result of each sizing approaches must be combined staListically to create
three?oint estimate which is also known as expected-value estimate.
Problem based Estimation
The problem based estrmalion is conducted using LOC based esfimation, Fp based
eslimafion, process based estimation and use cased based eslimation
LOC and FP based data are used in two ways during sofhl,,are estimaLion 1. These are useful to estimate the siz€ each element of software.
2. The baseline mehics are coilected from past project and LOC and Fp
d
is
used h conjunction with estimation variable to develop cost and effort
values for the project. (LOC) and (IP) estjmation are different estimarion
techniques. Yet, both have number of charactedsLics in common.
With a bounded statement o{ software scope a project planning process bedns zmd
by using the statement of scope the softrli,rare probtem is decomposed into the
functions that can be estimated individually.
(LOC) or (FP)is then estimated for €ach function
Baseline productiv€ly metrics are then apphed to the appropriate estimation
vadable and cost or effort for the function is denved-
Function estimates are combined to obtain an overall estimate for the entire
project.
.
Using historical data the project planner expected value by conside ng follow
variables -
1. q)timistic
2. Most
likely
3. P€ssimistic
For example, following formuia
S = [s opt + 4*
S-
+ spes,
]/6
conside$ for "most likely" estimate where S is the eshmaLion size variable, Sopr
represents the optimistic esLimate, Sm represents the most likely estimate and Spess
represents lhe pessimistic estimale values.
Example of LOC based Estimation
Consider ar ABC proie(t
v\
ith some jfiFortdnt modules such
rEcHNtd
L
PUAUCAflaNS' An Lp
Ultust
Iu knawtedg.
ds
8-
:
Mettics f,.r Pracess and Prcjec|s
13
2 2D gtaPhics
1 User il]terface and control facilities
4
3. 3D graPhics anaiysls
analysis
Database management
6. PeriPheral contol funchon
Comp.,tet SraPfucs di'Plry facrlit\
7. Design analysis models
LOC
Estimaie thc project in based on
function
we consider each module as seParate
Fot eshmating the given aPPlicalion
table
of code can be estrmated in the followins
S.
J"cories'pi"nait-t#
esLimahon
analysis funcLion based on three Pomt
ExPected LOC for 3D Geomerric
.
is-
o
o
o
eshmation
Most likelY esbmation
4700
OPtimistic
6000
r0000
Pessimistic esumahon
Expected
2.
S
=
IS.pr + (a. sm)+
value
=
14700
sps.l/6
+ (4 * 6000) + 100001
/6
)
€"450
Averate labor cost is $6000 Per month
estimated as
Then cost fol lines of code can be
cosVLOC = (6000i500) = $12
.
(32620/500) = 65 Person-months
Total estimated Project effort 1
th'ust lat t'noqtetlqe
IECtrNtCAL PUBLI1ATDNS' An up
414
Software Engineering
.
Iletrics far Process an.l Prcjects
ExamDle of FP based Estimation
FP focuses on bJormation domain values rather than sofh\rare functions. Thus we
in secfion 8 4 3
create a function point calculation table Ior ABC project, discussed
For this example we assume average complexiiy weightint facior.
of the complexity
is
estimated and the complexity
adjuslment factor is computed using the complexit)' factor table belo\a' (Based on
the 14 questlons)
Each
werghting factor
fEcHNtcAL PUEL|CA1aNS" An
up thtust
tu
knawtettse
8-15
frwate Engineenng
Tk' .stimated
FP is derive
number of ad justed
OLNT TOTAL.
t0 65
+ (0 01.t (Fi))l
cost and total effort
al eshmated Project
6.s) = $923
923) = $411658
6t
= 69 Person-month
Process based Estimation
[!ft
the Prolect
technique for estimaLing
estimaLion
used
the most commonly
n the Processes useo'
. This
base
-. In this technique'
ir'"?'" *q"o"a
f,[fl
deco
each
based Esti
ExamPte of Process
on is estimated in Percentage
L PUBLtcAf/.)Ns'
knawbdae
An op thtrst tot
Download