Вы находитесь на странице: 1из 179

CS605 Software Engineering-II

CS605 Software Engineering-II

VU

Table of Content
Table of Content...................................................................................................................2 Lecture No. 1........................................................................................................................4 Lecture No. 2......................................................................................................................12 Lecture No. 3......................................................................................................................14 Lecture No. 4......................................................................................................................1 Lecture No. 5......................................................................................................................23 Lecture No. 6......................................................................................................................2! Lecture No. !......................................................................................................................32 Lecture No. ......................................................................................................................35 Lecture No. ".....................................................................................................................3! Lecture No. 10....................................................................................................................41 Lecture No. 11....................................................................................................................46 Lecture No. 12....................................................................................................................65 #ea$ure$% #etric$ an& In&icator$......................................................................................65 #etric$ for $oftware 'ualit(...............................................................................................66 Lecture No. 13....................................................................................................................6! Lecture No. 14....................................................................................................................!1 )a$eline..............................................................................................................................!2 #etric$ for $*all organi+ation$..........................................................................................!2 Lecture No. 15....................................................................................................................!5 Lecture No. 16....................................................................................................................! Lecture No. 1!.................................................................................................................... 0 Lecture No. 1 .................................................................................................................... 4 Lecture No. 1".................................................................................................................... 5 Lecture No. 20.................................................................................................................... Lecture No. 21...................................................................................................................."2 Lecture No. 22...................................................................................................................."5 Lecture No. 23...................................................................................................................."" Lecture No. 24..................................................................................................................100 Lecture No. 25..................................................................................................................102 Lecture No. 26..................................................................................................................104 Lecture No. 2!..................................................................................................................106 Lecture No. 2 ..................................................................................................................10" Lecture No. 2"..................................................................................................................112 Lecture No. 30..................................................................................................................114 Lecture No. 31..................................................................................................................11! Lecture No. 32..................................................................................................................11 Lecture No. 33..................................................................................................................11" Lecture No. 34..................................................................................................................122 ,elea$e Nu*bering..........................................................................................................122 Internal ,elea$e Nu*bering.............................................................................................122 Lecture No. 35..................................................................................................................125 Lecture No. 36..................................................................................................................12 Lecture No. 3!..................................................................................................................133 Lecture No. 3 ..................................................................................................................135 Lecture No. 3"..................................................................................................................13 Lecture No. 40..................................................................................................................141

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

Lecture No. 41..................................................................................................................142 Lecture No. 42..................................................................................................................143 Lecture No. 43..................................................................................................................154 Lecture No. 44..................................................................................................................16" Lecture No. 45..................................................................................................................1!3

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

Lecture No. 1 Introduction to Software Engineering


T/i$ cour$e i$ a continuation of t/e fir$t cour$e on Software Engineering. In or&er to $et t/e conte5t of our &i$cu$$ion% let u$ fir$t loo4 at $o*e of t/e &efinition$ of $oftware engineering. Software Engineering i$ t/e $et of .roce$$e$ an& tool$ to &e2elo. $oftware. Software Engineering is the combination of all the tools, techniques, and processes that used in software production. T/erefore Software Engineering enco*.a$$e$ all t/o$e t/ing$ t/at are u$e& in $oftware .ro&uction li4e6 3rogra**ing Language 3rogra**ing Language 7e$ign Software 7e$ign Tec/ni'ue$ Tool$ Te$ting #aintenance 7e2elo.*ent etc.

So all t/o$e t/ing t/at are relate& to $oftware are al$o relate& to $oftware engineering. So*e of (ou *ig/t /a2e t/oug/t t/at /ow .rogra**ing language &e$ign coul& be relate& to $oftware engineering. If (ou loo4 *ore clo$el( at t/e $oftware engineering &efinition$ &e$cribe& abo2e t/en (ou will &efinitel( $ee t/at $oftware engineering i$ relate& to all t/o$e t/ing$ t/at are /el.ful in $oftware &e2elo.*ent. So i$ t/e ca$e wit/ .rogra**ing language &e$ign. 3rogra**ing language &e$ign i$ one of t/e *a8or $ucce$$e$ in la$t fift( (ear$. T/e &e$ign of 9&a language wa$ con$i&ere& a$ t/e con$i&erable effort in $oftware engineering. T/e$e &a($ ob8ect-oriente& .rogra**ing i$ wi&el( being u$e&. If .rogra**ing language$ will not $u..ort ob8ect-orientation t/en it will be 2er( &ifficult to i*.le*ent ob8ectoriente& &e$ign u$ing ob8ect-oriente& .rinci.le$. 9ll t/e$e effort$ *a&e t/e ba$i$ of $oftware engineering.

ell-Engineered Software
Let:$ tal4 $o*et/ing about w/at i$ well-engineere& $oftware. ;ell-engineere& $oftware i$ one t/at /a$ t/e following c/aracteri$tic$. It i$ reliable It /a$ goo& u$er-interface It /a$ acce.table .erfor*ance It i$ of goo& 'ualit( It i$ co$t-effecti2e

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

E2er( co*.an( can buil& $oftware wit/ unli*ite& re$ource$ but well-engineere& $oftware i$ one t/at confor*$ to all c/aracteri$tic$ li$te& abo2e. Software /a$ 2er( clo$e relation$/i. wit/ econo*ic$. ;/en e2er we tal4 about engineering $($te*$ we alwa($ fir$t anal(+e w/et/er t/i$ i$ econo*icall( fea$ible or not. T/erefore (ou /a2e to engineer all t/e acti2itie$ of $oftware &e2elo.*ent w/ile 4ee.ing it$ econo*ical fea$ibilit( intact. T/e *a8or c/allenge$ for a $oftware engineer i$ t/at /e /a$ to buil& $oftware wit/in li*ite& ti*e an& bu&get in a co$t-effecti2e wa( an& wit/ goo& 'ualit( T/erefore well-engineere& $oftware /a$ t/e following c/aracteri$tic$. 3ro2i&e$ t/e re'uire& functionalit( #aintainable ,eliable Efficient 1$er-frien&l( Co$t-effecti2e

)ut *o$t of t/e ti*e$ $oftware engineer$ en&$ u. in conflict a*ong all t/e$e goal$. It i$ al$o a big c/allenge for a $oftware engineer to re$ol2e all t/e$e conflict$.

T!e "alancing #ct$


Software Engineering i$ actuall( t/e balancing act. <ou /a2e to balance *an( t/ing$ li4e co$t% u$er frien&line$$% Efficienc(% ,eliabilit( etc. <ou /a2e to anal(+e w/ic/ one i$ t/e *ore i*.ortant feature for (our $oftware i$ it reliabilit(% efficienc(% u$er frien&line$$ or $o*et/ing el$e. T/ere i$ alwa($ a tra&e-off a*ong all t/e$e re'uire*ent$ of $oftware. It *a( be t/e ca$e t/at if (ou tr( to *a4e it *ore u$er-frien&l( t/en t/e efficienc( *a( $uffer. 9n& if (ou tr( to *a4e it *ore co$t-effecti2e t/en reliabilit( *a( $uffer. T/erefore t/ere i$ alwa($ a tra&e-off between t/e$e c/aracteri$tic$ of $oftware. T/e$e re'uire*ent$ *a( be conflicting. =or e5a*.le% t/ere *a( be ten$ion a*ong t/e following6 Co$t 2$. Efficienc( Co$t 2$. ,eliabilit( Efficienc( 2$. 1$er-interface

9 Software Engineer i$ re'uire& to anal(+e t/e$e conflicting entitie$ an& trie$ to $tri4e a balance.

C!allenge i% to balance t!e%e re&uire'ent%.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

Software Engineer$ alwa($ confront wit/ t/e c/allenge to *a4e a goo& balance of all t/e$e ting$ &e.en&ing on t/e re'uire*ent$ of t/e .articular $oftware $($te* at /an&. >e $/oul& anal(+e /ow *uc/ weig/t $/oul& all t/e$e t/ing$ get $uc/ t/at it will /a2e acce.table 'ualit(% acce.table .erfor*ance an& will /a2e acce.table u$er-interface. In $o*e $oftware t/e efficienc( i$ *ore i*.ortant an& &e$irable. =or e5a*.le if we tal4 about a crui$e *i$$ile or a nuclear reactor controller t/at are &ro2e& b( t/e $oftware $($te*$ t/en .erfor*ance an& reliabilit( i$ far *ore i*.ortant t/an t/e co$t-effecti2ene$$ an& u$er-frien&line$$. In t/e$e ca$e$ if (our $oftware &oe$ not react wit/in a certain a*ount of ti*e t/en it *a( re$ult in t/e &i$a$ter li4e C/ernob(l acci&ent. T/erefore $oftware &e2elo.*ent i$ a .roce$$ of balancing a*ong &ifferent c/aracteri$tic$ of $oftware &e$cribe& in t/e .re2iou$ $ection. 9n& it i$ an art to co*e u. wit/ $uc/ a goo& balance an& t/at art can be learne& fro* e5.erience.

Law of di'ini%!ing return%


In or&er to un&er$tan& t/i$ conce.t let$ ta4e a loo4 at an e5a*.le. #o$t of (ou /a2e notice& t/at if (ou &i$$ol2e $ugar in a gla$$ of water t/en t/e $weetne$$ of water will increa$e gra&uall(. )ut at a certain le2el of $aturation no *ore $ugar will &i$$ol2e& into water. T/erefore at t/at .oint of $aturation t/e $weetne$$ of water will not increa$e e2en if (ou a&& *ore $ugar into it. T/e law of &i*ini$/ing act &e$cribe$ t/e $a*e ./eno*enon. Si*ilar i$ t/e ca$e wit/ $oftware engineering. ;/ene2er (ou .erfor* an( ta$4 li4e i*.ro2ing t/e efficienc( of t/e $($te*% tr( to i*.ro2e it$ 'ualit( or u$er frien&line$$ t/en all t/e$e t/ing$ in2ol2e$ an ele*ent of co$t. If t/e 'ualit( of (our $($te* i$ not acce.table t/en wit/ t/e in2e$t*ent of little *one( it coul& be i*.ro2e& to a /ig/er &egree. )ut after reac/ing at a certain le2el of 'ualit( t/e return on in2e$t*ent on t/e $($te*:$ 'ualit( will beco*e re&uce&. #eaning t/at t/e return on in2e$t*ent on 'ualit( of $oftware will be le$$ t/an t/e effort or *one( we in2e$t. T/erefore% in *o$t of t/e ca$e$% after reac/ing at a rea$onable le2el of 'ualit( we &o not tr( to i*.ro2e t/e 'ualit( of $oftware an( furt/er. T/i$ ./eno*enon i$ $/own in t/e figure below.

cost

benefit

Software "ac(ground
- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
6

CS605 Software Engineering-II

VU

Ca.er ?one$ a renounce& .ractitioner an& re$earc/er in t/e file& of Software Engineering% /a& *a&e i**en$e re$earc/ in $oftware tea* .ro&ucti2it(% $oftware 'ualit(% $oftware co$t factor$ an& ot/er fiel&$ relate to $oftware engineering. >e *a&e a co*.an( na*e& Software 3ro&ucti2it( ,e$earc/ in w/ic/ t/e( anal(+e& *an( .ro8ect$ an& .ubli$/e& t/e re$ult$ in t/e for* of boo4$. Let:$ loo4 at t/e $u**ar( of t/e$e re$ult$. >e &i2i&e& $oftware relate& acti2itie$ into about twent(-fi2e &ifferent categorie$ li$te& in t/e table below. T/e( /a2e anal(+e& aroun& 10000 $oftware .ro8ect$ to co*e u. wit/ $uc/ a categori+ation. )ut /ere to cut &own t/e &i$cu$$ion we will onl( &e$cribe nine of t/e* t/at are li$te& below. 3ro8ect #anage*ent ,e'uire*ent Engineering 7e$ign Co&ing Te$ting Software @ualit( 9$$urance Software Configuration #anage*ent Software Integration an& ,e$t of t/e acti2itie$

Ane t/ing to note /ere i$ t/at (ou cannot $a( t/at an(one of t/e$e acti2itie$ i$ &o*inant a*ong ot/er$ in ter*$ of effort .utte& into it. >ere t/e .oint t/at we want to e*./a$i+e i$ t/at% t/oug/ co&ing i$ 2er( i*.ortant but it i$ not *ore t/an 13-14B of t/e w/ole effort of $oftware &e2elo.*ent. =re& )roo4 i$ a renowne& $oftware engineerC /e wrote a great boo4 relate& to $oftware engineering na*e& D9 #(t/ical #an #ont/E. >e co*bine& all /i$ article$ in t/i$ boo4. >ere we will &i$cu$$ one of /i$ article$ na*e& DNo Sil2er )ulletE w/ic/ /e inclu&e& in t/e boo4. #n e)cer*t fro' DNo Sil2er )ulletE F =re& )roo4$ Of all the monsters that fill the nightmares of our folklore, none terrify more than werewolves, because they transform unexpectedly from the familiar into horrors. For these we seek bullets of silver that can magically lay them to rest. he familiar software pro!ect has something of this character "at least as seen by the non#technical manager$, usually innocent and straight forward, but capable of becoming a monster of missed schedules, blown budgets, and flawed pro!ects. So we hear desperate cries for a silver bullet, something to make software costs drop as rapidly as computer hardware costs do. Scepticism is not pessimism, however. %lthough we see no startling breakthroughs, and indeed, such to be inconsistent with the nature of the software, many encouraging innovations are under way. % disciplined, consistent effort to develop, propagate and exploit them should indeed yield an order of magnitude improvement. here is no royal road, but there is a road. he first step towards the management of disease was replacement of demon theories and humours theories by the germ theory. he very first step, the beginning of hope, in itself dashed all hopes of magical solutions. &t told workers that progress would be made stepwise, at great effort, - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
7

CS605 Software Engineering-II

VU

and that a persistent, unremitting care would have to be paid to a discipline of cleanliness. So it is with software engineering today. So% accor&ing to =re& )roo4% in t/e e(e of an un$o./i$ticate& *anager $oftware i$ li4e a giant. So*eti*e$ it re2eal$ a$ an un$c/e&ule& &ela( an& $o*eti*e$ it $/ow$ u. in t/e for* of co$t o2errun. To 4ill t/i$ giant t/e *anager$ loo4 for *agical $olution$. )ut unfortunatel( *agic i$ not a realit(. ;e &o not /a2e an( *agic to &efeat t/i$ giant. T/ere i$ onl( one $olution an& t/at i$ to follow a &i$ci.line& a..roac/ to buil& $oftware. ;e can &efeat t/e giant na*e& $oftware b( u$ing &i$ci.line& an& engineere& a..roac/ towar&$ $oftware &e2elo.*ent. T/erefore% Software Engineering is nothing but a disciplined and systematic approach to software development. Now we will loo4 at $o*e of t/e acti2itie$ in2ol2e& in t/e cour$e of $oftware &e2elo.*ent. T/e acti2itie$ in2ol2e& in $oftware &e2elo.*ent can broa&l( be &i2i&e& into two *a8or categorie$ fir$t i$ con$truction an& $econ& i$ *anage*ent.

Software +e,elo*'ent
T/e con$truction acti2itie$ are t/o$e t/at are &irectl( relate& to t/e con$truction or &e2elo.*ent of t/e $oftware. ;/ile t/e *anage*ent acti2itie$ are t/o$e t/at co*.le*ent t/e .roce$$ of con$truction in or&er to .erfor* con$truction acti2itie$ $*oot/l( an& effecti2el(. 9 greater &etail of t/e acti2itie$ in2ol2e& in t/e con$truction an& *anage*ent categorie$ i$ .re$ente& below.

Con%truction
T/e con$truction acti2itie$ are t/o$e t/at &irectl( relate& to t/e &e2elo.*ent of $oftware% e.g. gat/ering t/e re'uire*ent$ of t/e $oftware% &e2elo. &e$ign% i*.le*ent an& te$t t/e $oftware etc. So*e of t/e *a8or con$truction acti2itie$ are li$te& below. ,e'uire*ent Gat/ering 7e$ign 7e2elo.*ent Co&ing Te$ting

-anage'ent
#anage*ent acti2itie$ are 4in& of u*brella acti2itie$ t/at are u$e& to $*oot/l( an& $ucce$$full( .erfor* t/e con$truction acti2itie$ e.g. .ro8ect .lanning% $oftware 'ualit( a$$urance etc. So*e of t/e *a8or *anage*ent acti2itie$ are li$te& below. 3ro8ect 3lanning an& #anage*ent Configuration #anage*ent Software @ualit( 9$$urance In$tallation an& Training

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

Management

Project Planning and Management Configuration Management Quality Assurance Installation and Training

Construction

Requirements Design Coding Testing Maintenance

=igure1 7e2elo.*ent 9cti2itie$

9$ we /a2e $ai& earlier t/at *anage*ent acti2itie$ are 4in& of u*brella acti2itie$ t/at $urroun& t/e con$truction acti2itie$ $o t/at t/e con$truction .roce$$ *a( .rocee& $*oot/l(. T/i$ fact i$ e*.at/i+e& in t/e =igure1. T/e figure $/ow$ t/at con$truction i$ $urroun&e& b( *anage*ent acti2itie$. T/at i$% certain .roce$$e$ an& rule$ go2ern all con$truction acti2itie$. T/e$e .roce$$e$ an& rule$ are relate& to t/e *anage*ent of t/e con$truction acti2itie$ an& not t/e con$truction it$elf.

# Software Engineering .ra'ewor(


T/e $oftware &e2elo.*ent organi+ation *u$t /a2e $.ecial focu$ on 'ualit( w/ile .erfor*ing t/e $oftware engineering acti2itie$. )a$e& on t/i$ co**it*ent to 'ualit( b( t/e organi+ation% a $oftware engineering fra*ewor4 i$ .ro.o$e& t/at i$ $/own in =igure 2. T/e *a8or co*.onent$ of t/i$ fra*ewor4 are &e$cribe& below. 9$ we /a2e $ai& earlier% t/e gi2en fra*ewor4 i$ ba$e& on t/e organi+ational co**it*ent to 'ualit(. T/e 'ualit( focu$ &e*an&$ t/at .roce$$e$ be &efine& for rational an& ti*el( &e2elo.*ent of $oftware. 9n& 'ualit( $/oul& be e*./a$i+e& w/ile e5ecuting t/e$e .roce$$e$.
@ualit( =ocu$6

T/e .roce$$e$ are $et of 4e( .roce$$ area$ HI39$J for effecti2el( *anage an& &eli2er 'ualit( $oftware in a co$t effecti2e *anner. T/e .roce$$e$ &efine t/e ta$4$ to be .erfor*e& an& t/e or&er in w/ic/ t/e( are to be .erfor*e&. E2er( ta$4 /a$ $o*e &eli2erable$ an& e2er( &eli2erable $/oul& be &eli2ere& at a .articular *ile$tone.
3roce$$e$:

#et/o&$ .ro2i&e t/e tec/nical D/ow-to:$E to carr(out t/e$e ta$4$. T/ere coul& be *ore t/an one tec/ni'ue to .erfor* a ta$4 an& &ifferent tec/ni'ue$ coul& be u$e& in &ifferent $ituation$.
#et/o&$6

Tool$ .ro2i&e auto*ate& or $e*i-auto*ate& $u..ort for $oftware .roce$$e$% *et/o&$% an& 'ualit( control.
Tool$6

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

Method Task et Process

T O O L S

Quality Focus

=igure 2 Software Engineering =ra*ewor4

Software +e,elo*'ent Loo*


Let:$ now loo4 at $oftware engineering acti2itie$ fro* a &ifferent .er$.ecti2e. Software &e2elo.*ent acti2itie$ coul& be .erfor*e& in a c(clic an& t/at c(cle i$ calle& $oftware &e2elo.*ent loo. w/ic/ i$ $/own in =igure3. T/e *a8or $tage$ of $oftware &e2elo.*ent loo. are &e$cribe& below. In t/i$ $tage we &eter*ine w/at i$ t/e .roble* again$t w/ic/ we are going to &e2elo. $oftware. >ere we tr( to co*.letel( co*.re/en& t/e i$$ue$ an& re'uire*ent$ of t/e $oftware $($te* to buil&.
3roble* 7efinition6

In t/i$ $tage we tr( to fin& t/e $olution of t/e .roble* on tec/nical groun&$ an& ba$e our actual i*.le*entation on it. T/i$ i$ t/e $tage w/ere a new $($te* i$ actuall( &e2elo.e& t/at $ol2e$ t/e .roble* &efine& in t/e fir$t $tage.
Tec/nical 7e2elo.*ent :

If t/ere are alrea&( &e2elo.e& $($te*H$J a2ailable wit/ w/ic/ our new $($te* /a$ to interact t/en t/o$e $($te*$ $/oul& al$o be t/e .art of our new $($te*. 9ll t/o$e e5i$ting $($te*H$J integrate wit/ our new $($te* at t/i$ $tage.
Solution Integration:

9fter going t/roug/ t/e .re2iou$ t/ree $tage$ $ucce$$full(% w/en we actuall( &e.lo(e& t/e new $($te* at t/e u$er $ite t/en t/at $ituation i$ calle& $tatu$ 'uo. )ut once we get new re'uire*ent$ t/en we nee& to c/ange t/e $tatu$ 'uo.
Statu$ @uo:

9fter getting new re'uire*ent$ we .erfor* all t/e $te.$ in t/e $oftware &e2elo.*ent loo. again. T/e $oftware &e2elo.e& t/roug/ t/i$ .roce$$ /a$ t/e .ro.ert( t/at t/i$ coul& be e2ol2e& an& integrate& ea$il( wit/ t/e e5i$ting $($te*$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

10

CS605 Software Engineering-II


Pro!lem Definition

VU

tatus Quo

Technical De"elo#ment

olution Integration =igure3 Software 7e2elo.*ent Loo.

/,er,iew of t!e cour%e content%


In t/e fir$t cour$e we $tu&ie& t/e tec/nical .roce$$e$ of $oftware &e2elo.*ent to buil& in&u$trial $trengt/ $oftware. T/at inclu&e$ re'uire*ent gat/ering an& anal($i$% $oftware &e$ign% co&ing% te$ting% an& &ebugging. In t/i$ cour$e our focu$ will be on t/e $econ& .art of Software Engineering% t/at i$% t/e acti2itie$ relate& to *anaging t/e tec/nical &e2elo.*ent. T/i$ cour$e will t/erefore inclu&e t/e following to.ic$6 1. Software &e2elo.*ent .roce$$ 2. Software .roce$$ *o&el$ 3. 3ro8ect #anage*ent Conce.t$ 4. Software 3ro8ect 3lanning 5. ,i$4 9nal($i$ an& #anage*ent 6. 3ro8ect Sc/e&ule$ an& Trac4ing !. Software @ualit( 9$$urance . Software Configuration #anage*ent ". Software 3roce$$ an& 3ro8ect #etric$ 10. ,e'uire*ent Engineering 3roce$$e$ 11. 0erification an& 0ali&ation 12. 3roce$$ I*.ro2e*ent 13. Legac( S($te*$ 14. Software C/ange 15. Software ,e-engineering

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

11

CS605 Software Engineering-II

VU

Lecture No. 0 Software 1roce%%


9 $oftware .roce$$ i$ a roa& *a. t/at /el.$ (ou create a ti*el(% /ig/ 'ualit( re$ult. It i$ t/e wa( we .ro&uce $oftware an& it .ro2i&e$ $tabilit( an& control. Eac/ .roce$$ &efine$ certain &eli2erable$ 4nown a$ t/e wor4 .ro&uct$. T/e$e inclu&e .rogra*$% &ocu*ent$% an& &ata .ro&uce& a$ a con$e'uence of t/e $oftware engineering acti2itie$.

1roce%% -aturit2 and C-T/e Software Engineering In$titute HSEIJ /a$ &e2elo.e& a fra*ewor4 to 8u&ge t/e .roce$$ *aturit( le2el of an organi+ation. T/i$ fra*ewor4 i$ 4nown a$ t/e Ca.abilit( #aturit( #o&el HC##J. T/i$ fra*ewor4 /a$ 5 &ifferent le2el$ an& an organi+ation i$ .lace& into one of t/e$e 5 le2el$. T/e following figure $/ow$ t/e C## fra*ewor4.

T/e$e le2el$ are briefl( &e$cribe& a$ follow$E 1. Le2el 1 F Initial6 T/e $oftware .roce$$ i$ c/aracteri+e& a$ a& /oc an& occa$ionall( e2en c/aotic. =ew .roce$$e$ are &efine&% an& $ucce$$ &e.en&$ u.on in&i2i&ual effort. )( &efault e2er( organi+ation woul& be at le2el 1. 2. Le2el 2 F ,e.eatable6 )a$ic .ro8ect *anage*ent .roce$$e$ are e$tabli$/e& to trac4 co$t% $c/e&ule% an& functionalit(. T/e nece$$ar( .ro8ect &i$ci.line i$ in .lace to re.eat earlier $ucce$$e$ on .ro8ect$ wit/ $i*ilar a..lication$. 3. Le2el 3 F 7efine&6 T/e $oftware .roce$$ for bot/ *anage*ent an& engineering acti2itie$ i$ &ocu*ente&% $tan&ar&i+e&% an& integrate& into an organi+ational $oftware .roce$$. 9ll .ro8ect$ u$e a &ocu*ente& an& a..ro2e& 2er$ion of t/e organi+ation:$ .roce$$ for &e2elo.ing an& $u..orting $oftware. 4. Le2el 4 F #anage&6 7etaile& *ea$ure$ for $oftware .roce$$ an& .ro&uct 'ualit( are controlle&. )ot/ t/e $oftware .roce$$ an& .ro&uct$ are 'uantitati2el( un&er$too& an& controlle& u$ing &etaile& *ea$ure$. 5. Le2el 5 F A.ti*i+ing6 Continuou$ .roce$$ i*.ro2e*ent i$ enable& b( 'ualitati2e fee&bac4 fro* t/e .roce$$ an& fro* te$ting inno2ati2e i&ea$ an& tec/nologie$. SEI /a$ a$$ociate& 4e( .roce$$ area$ wit/ eac/ *aturit( le2el. T/e I39$ &e$cribe t/o$e $oftware engineering function$ t/at *u$t be .re$ent to $ati$f( goo& .ractice at a .articular le2el. Eac/ I39 i$ &e$cribe& b( i&entif(ing t/e following c/aracteri$tic$6

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

12

CS605 Software Engineering-II

VU

1. Goal$6 t/e o2erall ob8ecti2e$ t/at t/e I39 *u$t ac/ie2e. 2. Co**it*ent$6 re'uire*ent$ i*.o$e& on t/e organi+ation t/at *u$t be *et to ac/ie2e t/e goal$ or .ro2i&e .roof of intent to co*.l( wit/ t/e goal$. 3. 9bilitie$6 t/o$e t/ing$ t/at *u$t be in .lace F organi+ationall( an& tec/nicall( F to enable t/e organi+ation to *eet t/e co**it*ent$. 4. 9cti2itie$6 t/e $.ecific ta$4$ re'uire& to ac/ie2e t/e I39 function 5. #et/o&$ for *onitoring i*.le*entation6 t/e *anner in w/ic/ t/e acti2itie$ are *onitore& a$ t/e( are .ut into .lace. 6. #et/o&$ for 2erif(ing i*.le*entation6 t/e *anner in w/ic/ .ro.er .ractice for t/e I39 can be 2erifie&. Eac/ of t/e I39 i$ &efine& b( a $et of .ractice$ t/at contribute to $ati$f(ing it$ goal$. T/e 4e( .ractice$ are .olicie$% .roce&ure$% an& acti2itie$ t/at *u$t occur before a 4e( .roce$$ area /a$ been full( in$titute&. T/e following table $u**ari+e$ t/e I39$ &efine& for eac/ le2el. Le2el 1 2 I39$ No I39 i$ &efine& a$ organi+ation$ at t/i$ le2el follow a&-/oc .roce$$e$ K Software Configuration #anage*ent K Software @ualit( 9$$urance K Software $ubcontract #anage*ent K Software .ro8ect trac4ing an& o2er$ig/t K Software .ro8ect .lanning K ,e'uire*ent *anage*ent K 3eer re2iew$ K Inter-grou. coor&ination K Software .ro&uct Engineering K Integrate& $oftware *anage*ent K Training .rogra* K Argani+ation .roce$$ *anage*ent K Argani+ation .roce$$ focu$ K Software 'ualit( *anage*ent K @uantitati2e .roce$$ *anage*ent K 3roce$$ c/ange *anage*ent K Tec/nolog( c/ange *anage*ent K 7efect .re2ention

4 5

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

13

CS605 Software Engineering-II

VU

Lecture No. 3 Software Lifec2cle -odel%


,ecalling fro* our fir$t cour$e% a $oftware $($te* .a$$e$ t/roug/ t/e following ./a$e$6 1. 2. 3. 4. 0i$ion 7efinition 7e2elo.*ent #aintenance F focu$ on why F focu$ on what F focu$ on how F focu$ on change

7uring t/e$e ./a$e$% a nu*ber of acti2itie$ are .erfor*e&. 9 lifec(cle *o&el i$ a $erie$ of $te.$ t/roug/ w/ic/ t/e .ro&uct .rogre$$e$. T/e$e inclu&e re'uire*ent$ ./a$e% $.ecification ./a$e% &e$ign ./a$e% i*.le*entation ./a$e% integration ./a$e% *aintenance ./a$e% an& retire*ent. Software 7e2elo.*ent Lifec(cle #o&el$ &e.ict t/e wa( (ou organi+e (our acti2itie$. T/ere are a nu*ber of Software 7e2elo.*ent Lifec(cle #o&el$% eac/ /a2ing it$ $trengt/$ an& wea4ne$$e$ an& $uitable in &ifferent $ituation$ an& .ro8ect t(.e$. T/e li$t of *o&el$ inclu&e$ t/e following6 $ $ $ $ $ $ $ $ )uil&-an&-fi5 *o&el ;aterfall *o&el ,a.i& .rotot(.ing *o&el Incre*ental *o&el E5tre*e .rogra**ing S(nc/roni+e-an&-$tabili+e *o&el S.iral *o&el Ab8ect-oriente& life-c(cle *o&el$

In t/e following $ection$ we $/all $tu&( t/e$e *o&el$ in &etail an& &i$cu$$ t/eir $trengt/$ an& wea4ne$$e$.

"uild and .i) -odel


T/i$ *o&el i$ &e.icte& in t/e following &iagra*6

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

14

CS605 Software Engineering-II

VU

It i$ unfortunate t/at *an( .ro&uct$ are &e2elo.e& u$ing w/at i$ 4nown a$ t/e buil&-an&fi5 *o&el. In t/i$ *o&el t/e .ro&uct i$ con$tructe& wit/out $.ecification or an( atte*.t at &e$ign. T/e &e2elo.er$ $i*.l( buil& a .ro&uct t/at i$ rewor4e& a$ *an( ti*e$ a$ nece$$ar( to $ati$f( t/e client. T/i$ *o&el *a( wor4 for $*all .ro8ect$ but i$ totall( un$ati$factor( for .ro&uct$ of an( rea$onable $i+e. T/e co$t of buil&-an& fi5 i$ actuall( far greater t/an t/e co$t of .ro.erl( $.ecifie& an& carefull( &e$igne& .ro&uct. #aintenance of t/e .ro&uct can be e5tre*el( in t/e ab$ence of an( &ocu*entation.

aterfall -odel
T/e fir$t .ubli$/e& *o&el of t/e $oftware &e2elo.*ent .roce$$ wa$ &eri2e& fro* ot/er engineering .roce$$e$. )ecau$e of t/e ca$ca&e fro* one ./a$e to anot/er% t/i$ *o&el i$ 4nown a$ t/e waterfall *o&el. T/i$ *o&el i$ al$o 4nown a$ linear $e'uential *o&el. T/i$ *o&el i$ &e.icte& in t/e following &iagra*.

T/e .rinci.al $tage$ of t/e *o&el *a. &irectl( onto fun&a*ental &e2elo.*ent acti2itie$. It $ugge$t$ a $($te*atic% $e'uential a..roac/ to $oftware &e2elo.*ent t/at begin$ at t/e $($te* le2el an& .rogre$$e$ t/roug/ t/e anal($i$% &e$ign% co&ing% te$ting% an& *aintenance. In t/e literature% .eo.le /a2e i&entifie& fro* 5 to $tage$ of $oftware &e2elo.*ent.

T/e fi2e $tage$ abo2e are a$ follow$6 1. ,e'uire*ent 9nal($i$ an& 7efinition6 ;/at - T/e $($te*$ $er2ice$% con$traint$ an& goal$ are e$tabli$/e& b( con$ultation wit/ $($te* u$er$. T/e( are t/en &efine& in &etail an& $er2e a$ a $($te* $.ecification. 2. S($te* an& Software 7e$ign6 >ow F T/e $($te* &e$ign .roce$$ .artition$ t/e re'uire*ent$ to eit/er /ar&ware of $oftware $($te*$. It e$tabli$/e$ an& o2erall $($te* arc/itecture. Software &e$ign in2ol2e$ fun&a*ental $($te* ab$traction$ an& t/eir relation$/i.$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

15

CS605 Software Engineering-II

VU

3. I*.le*entation an& 1nit Te$ting6 - >ow F 7uring t/i$ $tage t/e $oftware &e$ign i$ reali+e& a$ a $et of .rogra*$ or .rogra* unit$. 1nit te$ting in2ol2e$ 2erif(ing t/at eac/ unit *eet$ it$ $.ecification$. 4. Integration an& $($te* te$ting6 T/e in&i2i&ual .rogra* unit or .rogra*$ are integrate& an& te$te& a$ a co*.lete $($te* to en$ure t/at t/e $oftware re'uire*ent$ /a2e been *et. 9fter te$ting% t/e $oftware $($te* i$ &eli2ere& to t/e cu$to*er. 5. A.eration an& #aintenance6 Nor*all( t/i$ i$ t/e longe$t ./a$e of t/e $oftware life c(cle. T/e $($te* i$ in$talle& an& .ut into .ractical u$e. #aintenance in2ol2e$ correcting error$ w/ic/ were not &i$co2ere& in earlier $tage$ of t/e life-c(cle% i*.ro2ing t/e i*.le*entation of $($te* unit$ an& en/ancing t/e $($te*:$ $er2ice$ a$ new re'uire*ent$ are &i$co2ere&. In .rinci.le% t/e re$ult of eac/ ./a$e i$ one or *ore &ocu*ent$ w/ic/ are a..ro2e&. No ./a$e i$ co*.lete until t/e &ocu*entation for t/at ./a$e /a$ been co*.lete& an& .ro&uct$ of t/at ./a$e /a2e been a..ro2e&. T/e following ./a$e $/oul& not $tart until t/e .re2iou$ ./a$e /a$ fini$/e&. ,eal .ro8ect$ rarel( follow t/e $e'uential flow t/at t/e *o&el .ro.o$e$. In general t/e$e ./a$e$ o2erla. an& fee& infor*ation to eac/ ot/er. >ence t/ere $/oul& be an ele*ent of iteration an& fee&bac4. 9 *i$ta4e caug/t an( $tage $/oul& be referre& bac4 to t/e $ource an& all t/e $ub$e'uent $tage$ nee& to be re2i$ite& an& corre$.on&ing &ocu*ent$ $/oul& be u.&ate& accor&ingl(. T/i$ fee&bac4 .at/ i$ $/own in t/e following &iagra*.

)ecau$e of t/e co$t$ of .ro&ucing an& a..ro2ing &ocu*ent$% iteration$ are co$tl( an& re'uire $ignificant rewor4. T/e ;aterfall #o&el i$ a &ocu*entation-&ri2en *o&el. It t/erefore generate$ co*.lete an& co*.re/en$i2e &ocu*entation an& /ence *a4e$ t/e *aintenance ta$4 *uc/ ea$ier. It /owe2er $uffer$ fro* t/e fact t/at t/e client fee&bac4 i$ recei2e& w/en t/e .ro&uct i$ finall( &eli2ere& an& /ence an( error$ in t/e re'uire*ent $.ecification are not &i$co2ere& until t/e .ro&uct i$ $ent to t/e client after co*.letion. T/i$ t/erefore /a$ *a8or ti*e an& co$t relate& con$e'uence$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

16

CS605 Software Engineering-II

VU

4a*id 1rotot2*ing -odel


T/e ,a.i& 3rotot(.ing #o&el i$ u$e& to o2erco*e i$$ue$ relate& to un&er$tan&ing an& ca.turing of u$er re'uire*ent$. In t/i$ *o&el a *oc4-u. a..lication i$ create& Dra.i&l(E to $olicit fee&bac4 fro* t/e u$er. Ance t/e u$er re'uire*ent$ are ca.ture& in t/e .rotot(.e to t/e $ati$faction of t/e u$er% a .ro.er re'uire*ent $.ecification &ocu*ent i$ &e2elo.e& an& t/e .ro&uct i$ &e2elo.e& fro* $cratc/. 9n e$$ential a$.ect of ra.i& .rotot(.e i$ e*be&&e& in t/e wor& Dra.i&E. T/e &e2elo.er $/oul& en&ea2our to con$truct t/e .rotot(.e a$ 'uic4l( a$ .o$$ible to $.ee&u. t/e $oftware &e2elo.*ent .roce$$. It *u$t alwa($ be 4e.t in *in& t/at t/e $ole .ur.o$e of t/e ra.i& .rotot(.e i$ to ca.ture t/e client:$ nee&$C once t/i$ /a$ been &eter*ine&% t/e ra.i& .rotot(.e i$ effecti2el( &i$car&e&. =or t/i$ rea$on% t/e internal $tructure of t/e ra.i& .rotot(.e i$ not rele2ant.

Integrating t!e

aterfall and 4a*id 1rotot2*ing -odel%

7e$.ite t/e *an( $ucce$$e$ of t/e waterfall *o&el% it /a$ a *a8or &rawbac4 in t/at t/e &eli2ere& .ro&uct *a( not fulfil t/e client:$ nee&$. Ane $olution to t/i$ i$ to co*bine ra.i& .rotot(.ing wit/ t/e waterfall *o&el. In t/i$ a..roac/% ra.i& .rotot(.ing can be u$e& a$ a re'uire*ent gat/ering tec/ni'ue w/ic/ woul& t/en be followe& b( t/e acti2itie$ .erfor*e& in t/e waterfall *o&el.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

17

CS605 Software Engineering-II

VU

Lecture No. 5 Incre'ental -odel%


9$ &i$cu$$e& abo2e% t/e *a8or &rawbac4$ of t/e waterfall *o&el are &ue to t/e fact t/at t/e entire .ro&uct i$ &e2elo.e& an& &eli2ere& to t/e client in one .ac4age. T/i$ re$ult$ in &ela(e& fee&bac4 fro* t/e client. )ecau$e of t/e long ela.$e& ti*e% a /uge new in2e$t*ent of ti*e an& *one( *a( be re'uire& to fi5 an( error$ of o*i$$ion or co**i$$ion or to acco**o&ate an( new re'uire*ent$ cro..ing u. &uring t/i$ .erio&. T/i$ *a( ren&er t/e .ro&uct a$ unu$able. Incre*ental *o&el *a( be u$e& to o2erco*e t/e$e i$$ue$. In t/e incre*ental *o&el$% a$ o..o$e& to t/e waterfall *o&el% t/e .ro&uct i$ .artitione& into $*aller .iece$ w/ic/ are t/en built an& &eli2ere& to t/e client in incre*ent$ at regular inter2al$. Since eac/ .iece i$ *uc/ $*aller t/an t/e w/ole% it can be built an& $ent to t/e client 'uic4l(. T/i$ re$ult$ in 'uic4 fee&bac4 fro* t/e client an& an( re'uire*ent relate& error$ or c/ange$ can be incor.orate& at a *uc/ le$$er co$t. It i$ t/erefore le$$ trau*atic a$ co*.are& to t/e waterfall *o&el. It al$o re'uire& $*aller ca.ital outla( an& (iel& a

ra.i& return on in2e$t*ent. >owe2er% t/i$ *o&el nee&$ an& o.en arc/itecture to allow integration of $ub$e'uent buil&$ to (iel& t/e bigger .ro&uct. 9 nu*ber of 2ariation$ are u$e& in ob8ect-oriente& life c(cle *o&el$. T/ere are two fun&a*ental a..roac/e$ to t/e incre*ental &e2elo.*ent. In t/e fir$t ca$e% t/e re'uire*ent$% $.ecification$% an& arc/itectural &e$ign for t/e w/ole .ro&uct are co*.lete& before i*.le*entation of t/e 2ariou$ buil&$ co**ence$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

18

CS605 Software Engineering-II

VU

In a *ore ri$4( 2er$ion% once t/e u$er re'uire*ent$ /a2e been elicite&% t/e $.ecification$ of t/e fir$t buil& are &rawn u.. ;/en t/i$ /a$ been co*.lete&% t/e $.ecification tea*
Build 1 Specification Design Implementation, integration Deliver to client

Build 2 Specification Build 3 Specification Design Implementation, integration Deliver to client Design Implementation, integration Deliver to client

Build n Specification Design Implementation, integration Deliver to client

Specification team Design team

Implementation, integration team

turn$ to t/e $.ecification of t/e $econ& buil& w/ile t/e &e$ign tea* &e$ign$ t/e fir$t buil&. T/u$ t/e 2ariou$ buil&$ are con$tructe& in .arallel% wit/ eac/ tea* *a4ing u$e of t/e infor*ation gaine& in t/e all t/e .re2iou$ buil&$. T/i$ a..roac/ incur$ t/e ri$4 t/at t/e re$ulting buil& will not fit toget/er an& /ence re'uire$ careful *onitoring.

4a*id #**lication +e,elo*'ent 64#+7


,a.i& a..lication &e2elo.*ent i$ anot/er for* of incre*ental *o&el. It i$ a /ig/ $.ee& a&a.tation of t/e linear $e'uential *o&el in w/ic/ full( functional $($te* in a 2er( $/ort ti*e H2-3 *ont/$J. T/i$ *o&el i$ onl( a..licable in t/e .ro8ect$ w/ere re'uire*ent$ are well un&er$too& an& .ro8ect $co.e i$ con$traine&. )ecau$e of t/i$ rea$on it i$ u$e& .ri*aril( for infor*ation $($te*$.

S2nc!roni8e and Stabili8e -odel


T/i$ i$ (et anot/er for* of incre*ental *o&el a&o.te& b( #icro$oft. In t/i$ *o&el% &uring t/e re'uire*ent$ anal($i$ inter2iew$ of .otential cu$to*er$ are con&ucte& an& re'uire*ent$ &ocu*ent i$ &e2elo.e&. Ance t/e$e re'uire*ent$ /a2e been ca.ture&% $.ecification$ are &rawn u.. T/e .ro8ect i$ t/en &i2i&e& into 3 or 4 buil&$. Eac/ buil& i$ carrie& out b( $*all tea*$ wor4ing in .arallel. 9t t/e en& of eac/ &a( t/e co&e i$ $(nc/roni+e& Hte$t an& &ebugJ an& at t/e en& of t/e buil& it i$ $tabili+e& b( free+ing t/e buil& an& re*o2ing an( re*aining &efect$. )ecau$e of t/e $(nc/roni+ation$% co*.onent$ alwa($ wor4 toget/er. T/e .re$ence of an e5ecutable .ro2i&e$ earl( in$ig/t$ into o.eration of .ro&uct.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

19

CS605 Software Engineering-II

VU

S*iral -odel
T/i$ *o&el wa$ &e2elo.e& b( )arr( )oe/*. T/e *ain i&ea of t/i$ *o&el i$ to a2ert ri$4 a$ t/ere i$ alwa($ an ele*ent of ri$4 in &e2elo.*ent of $oftware. =or e5a*.le% 4e( .er$onnel *a( re$ign at a critical 8uncture% t/e *anufacturer of t/e $oftware &e2elo.*ent *a( go ban4ru.t% etc. In it$ $i*.lifie& for*% t/e S.iral #o&el i$ ;aterfall *o&el .lu$ ri$4 anal($i$. In t/i$ ca$e eac/ $tage i$ .rece&e& b( i&entification of alternati2e$ an& ri$4 anal($i$ an& i$ t/en followe& b( e2aluation an& .lanning for t/e ne5t ./a$e. If ri$4$ cannot be re$ol2e&% .ro8ect i$ i**e&iatel( ter*inate&. T/i$ i$ &e.icte& in t/e following &iagra*.

,i$4 9nal($i$

Ra#id Prototy#e #ecification Design 0erif( Im#lementation

9$ can be $een% a S.iral #o&el /a$ two &i*en$ion$. ,a&ial &i*en$ion re.re$ent$ t/e cu*ulati2e co$t to &ate an& t/e angular &i*en$ion re.re$ent$ t/e .rogre$$ t/roug/ t/e $.iral. Eac/ ./a$e begin$ b( &eter*ining ob8ecti2e$ of t/at ./a$e an& at eac/ ./a$e a new .roce$$ *o&el *a( be followe&.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

20

CS605 Software Engineering-II

VU

9 full 2er$ion of t/e S.iral #o&el i$ $/own below6

T/e *ain $trengt/ of t/e S.iral #o&el co*e$ fro* t/e fact t/at it i$ 2er( $en$iti2e to t/e ri$4. )ecau$e of t/e $.iral nature of &e2elo.*ent it i$ ea$( to 8u&ge /ow *uc/ to te$t an& t/ere i$ no &i$tinction between &e2elo.*ent an& *aintenance. It /owe2er can onl( be u$e& for large-$cale $oftware &e2elo.*ent an& t/at too for internal Hin-/ou$eJ $oftware onl(.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

21

CS605 Software Engineering-II

VU

Determine o!jecti"es' alternati"es' constraints

Identify and resol"e risks

Plan %e&t Phase

De"elo# and "erify ne&t(le"el #roduct

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

22

CS605 Software Engineering-II

VU

Lecture No. 5 /b9ect-/riented Lifec2cle -odel%


Ab8ect-oriente& lifec(cle *o&el$ a..reciate t/e nee& for iteration wit/in an& between ./a$e$. T/ere are a nu*ber of t/e$e *o&el$. 9ll of t/e$e *o&el$ incor.orate $o*e for* of iteration% .aralleli$*% an& incre*ental &e2elo.*ent.

e:tre'e 1rogra''ing
It i$ a $o*ew/at contro2er$ial new a..roac/. In t/i$ a..roac/ u$er re'uire*ent$ are ca.ture& t/roug/ $torie$ w/ic/ are t/e $cenario$ .re$enting t/e feature$ nee&e& b( t/e clientL E$ti*ate for &uration an& co$t of eac/ $tor( i$ t/en carrie& out. Storie$ for t/e ne5t buil& are $electe&. T/en eac/ buil& i$ &i2i&e& into ta$4$. Te$t ca$e$ for ta$4 are &rawn u. fir$t before an& &e2elo.*ent an& continuou$ te$ting i$ .erfor*e& t/roug/out t/e &e2elo.*ent .roce$$.
Architectural s#ike )ser stories

Release Planning

Iteration

Acce#tance test

#ike

mall release

Ane 2er( i*.ortant feature of eMtre*e .rogra**ing i$ t/e conce.t of .air .rogra**ing. In t/i$% a tea* of two &e2elo.er$ &e2elo. t/e $oftware% wor4ing in tea* a$ a .air to t/e e5tent t/at t/e( e2en $/are a $ingle co*.uter. In eMtere*e 3rogra**ing *o&el% co*.uter$ are .ut in center of large roo* line& wit/ cubicle$ an& client re.re$entati2e i$ alwa($ .re$ent. Ane 2er( i*.ortant re$triction i*.o$e& in t/e *o&el i$ t/at no tea* i$ allowe& to wor4 o2erti*e for 2 $ucce$$i2e wee4$. M3 /a$ /a& $o*e $ucce$$e$. It i$ goo& w/en re'uire*ent$ are 2ague or c/anging an& t/e o2erall $co.e of t/e .ro8ect i$ li*ite&. It i$ /owe2er too $oon to e2aluate M3.

.ountain -odel
=ountain *o&el i$ anot/er ob8ect-oriente& lifec(cle *o&el. T/i$ i$ &e.icte& in t/e following &iagra*.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

23

CS605 Software Engineering-II

VU

Maintenance

Further de"elo#ment

*#erations

Im#lementation and integration

Im#lementation *!ject(oriented design

*!ject(oriented analysis

Requirement

In t/i$ *o&el t/e circle$ re.re$enting t/e 2ariou$ ./a$e$ o2erla.% e5.licitl( re.re$enting an o2erla. between acti2itie$. T/e arrow$ wit/in a ./a$e re.re$ent iteration wit/in t/e ./a$e. T/e *aintenance c(cle i$ $*aller% to $(*boli+e re&uce& *aintenance effort w/en t/e ob8ect oriente& .ara&ig* i$ u$e&.

4ational Unified 1roce%% 64U17


,ational 1nifie& 3roce$$ i$ 2er( clo$el( a$$ociate& wit/ 1#L an& Irutc/en:$ arc/itectural *o&el. In t/i$ *o&el a $oftware .ro&uct i$ &e$igne& an& built in a $ucce$$ion of incre*ental iteration$. It incor.orate$ earl( te$ting an& 2ali&ation of &e$ign i&ea$ an& earl( ri$4 *itigation. T/e /ori+ontal &i*en$ion re.re$ent$ t/e dynamic aspect of t/e .roce$$. T/i$ inclu&e$ c(cle$% ./a$e$% iteration$% an& *ile$tone$. T/e 2ertical &i*en$ion re.re$ent$ t/e static aspect of t/e .roce$$ &e$cribe& in ter*$ of .roce$$ co*.onent$ w/ic/ inclu&e acti2itie$% &i$ci.line$% artifact$% an& role$. T/e .roce$$ e*./a$i+e$ t/at &uring &e2elo.*ent% all acti2itie$ are .erfor*e& in .arallel% /owe2er% an& at a gi2en ti*e one acti2it( *a( /a2e *ore e*./a$i$ t/an t/e ot/er. T/e following figure &e.icting ,13 i$ ta4en fro* Irutc/en:$ .a.er.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

24

CS605 Software Engineering-II

VU

Co'*ari%on of Lifec2cle -odel%


9$ &i$cu$$e& abo2e% eac/ lifec(cle *o&el /a$ $o*e $trengt/$ an& wea4ne$$e$. T/e$e are $u**ari+e& in t/e following table6

T/e criteria to be u$e& for &eci&ing on a *o&el inclu&e t/e organi+ation% it$ *anage*ent% $4ill$ of t/e e*.lo(ee$% an& t/e nature of t/e .ro&uct. No $ingle *o&el *a( fulfill t/e nee&$ in a gi2en $ituation. It *a( t/erefore be be$t to &e2i$e a lifec(cle *o&el tune& to (our own nee&$ b( creating a D#i5-an&-*atc/E life-c(cle *o&el.

;ualit2 #%%urance and +ocu'entation


It *a( be note& t/at t/ere i$ no $e.arate @9 or &ocu*entation ./a$e. @9 i$ an acti2it( .erfor*e& t/roug/out $oftware .ro&uction. It in2ol2e$ 2erification an& 2ali&ation.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

25

CS605 Software Engineering-II

VU

0erification i$ .erfor*e& at t/e en& of eac/ ./a$e w/erea$ 2ali&ation i$ .erfor*e& before &eli2ering t/e .ro&uct to t/e client. Si*ilarl(% e2er( ./a$e *u$t be full( &ocu*ente& before $tarting t/e ne5t ./a$e. It i$ i*.ortant to note t/at .o$t.one& &ocu*entation *a( ne2er be co*.lete& a$ t/e re$.on$ible in&i2i&ual *a( lea2e. 7ocu*entation i$ i*.ortant a$ t/e .ro&uct i$ con$tantl( c/angingNwe nee& t/e &ocu*entation to &o t/i$. T/e &e$ign Hfor e5a*.leJ will be *o&ifie& &uring &e2elo.*ent% but t/e original &e$igner$ *a( not be a2ailable to &ocu*ent it. T/e following table $/ow$ t/e @9 an& &ocu*entation acti2itie$ a$$ociate& wit/ eac/ $tage.
3/a$e ,e'uire*ent 7efinition =unctional S.ecification 7e$ign Co&ing 7ocu*ent$ $ $ $ $ $ $ $ $ $ $ $ $ ,a.i& .rotot(.e% or ,e'uire*ent$ &ocu*ent S.ecification &ocu*ent H$.ecification$J Software 3ro&uct #anage*ent 3lan 9rc/itectural 7e$ign 7etaile& 7e$ign Source co&e Te$t ca$e$ Source co&e Te$t ca$e$ C/ange recor& ,egre$$ion te$t ca$e$ @9 $ $ $ $ $ $ $ $ $ $ $ $ $ ,a.i& .rotot(.e ,e2iew$ Traceabilit( =S ,e2iew C/ec4 t/e S3#3 Traceabilit( ,e2iew Traceabilit( ,e2iew Te$ting Integration te$ting 9cce.tance te$ting ,egre$$ion te$ting

Integration #aintenance

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

26

CS605 Software Engineering-II

VU

Lecture No. 6 Software 1ro9ect -anage'ent Conce*t%


Software .ro8ect *anage*ent i$ a 2er( i*.ortant acti2it( for $ucce$$ful .ro8ect$. In fact% in an organi+ation at C## Le2el ba$ic .ro8ect *anage*ent .roce$$e$ are e$tabli$/e& to trac4 co$t% $c/e&ule% an& functionalit(. T/at i$% it i$ c/aracteri+e& b( ba$ic .ro8ect *anage*ent .ractice$. It al$o i*.lie$ t/at wit/out .ro8ect *anage*ent not *uc/ can be ac/ie2e&. Ca.er$ ?one$% in /i$ boo4 on Software )e$t 3ractice$% note$ t/at% for t/e .ro8ect$ t/e( /a2e anal(+e&% goo& .ro8ect *anage*ent wa$ a$$ociate& wit/ 100B of t/e $ucce$$ful .ro8ect an& ba& .ro8ect *anage*ent wa$ a$$ociate& wit/ 100B of t/e un$ucce$$ful .ro8ect$. T/erefore% un&er$tan&ing of goo& .ro8ect *anage*ent .rinci.le$ an& .ractice$ i$ e$$ential for all .ro8ect *anager$ an& $oftware engineer$. Software .ro8ect *anage*ent in2ol2e$ t/at .lanning% organi+ation% *onitoring% an& control of t/e .eo.le an& t/e .roce$$e$.

Software 1ro9ect -anage'ent< .actor% t!at influence re%ult%


T/e fir$t $te. towar&$ better .ro8ect *anage*ent i$ t/e co*.re/en$ion of t/e factor$ t/at influence re$ult$ of a .ro8ect. 9*ong t/e$e% t/e *o$t i*.ortant factor$ are6 + 3ro8ect $i+e 9$ t/e .ro8ect $i+e increa$e$% t/e co*.le5it( of t/e .roble* al$o increa$e$ an& t/erefore it$ *anage*ent al$o beco*e$ *ore &ifficult. + 7eli2er( &ea&line 7eli2er( &ea&line &irectl( influence$ t/e re$ource$ an& 'ualit(. ;it/ a reali$tic &ea&line% c/ance$ of &eli2ering t/e .ro&uct wit/ /ig/ 'ualit( an& rea$onable re$ource$ increa$e tre*en&ou$l( a$ co*.are& to an unreali$tic &ea&line. So a .ro8ect *anager /a$ to fir$t &eter*ine a reali$tic an& rea$onable &ea&line an& t/en *onitor t/e .ro8ect .rogre$$ an& en$ure ti*el( &eli2er(. + )u&get$ an& co$t$ 9 .ro8ect *anager i$ re$.on$ible for en$uring &eli2er( of t/e .ro8ect wit/in t/e allocate& bu&get an& $c/e&ule. 9 goo& e$ti*ate of bu&get% co$t an& $c/e&ule i$ e$$ential for an( $ucce$$ful .ro8ect. It i$ t/erefore i*.erati2e t/at t/e .ro8ect *anager un&er$tan& an& learn$ t/e tec/ni'ue$ an& .rinci.le nee&e& to &e2elo. t/e$e e$ti*ate$. + 9..lication &o*ain 9..lication &o*ain al$o .la($ an i*.ortant role in t/e $ucce$$ of a .ro8ect. T/e c/ance$ of $ucce$$ of a .ro8ect in a well-4nown a..lication &o*ain woul& be *uc/ better t/an of a .ro8ect in a relati2el( un4nown &o*ain. T/e .ro8ect *anager t/u$ nee&$ to i*.le*ent *ea$ure$ to /an&le unfore$een .roble*$ t/at *a( ari$e &uring t/e .ro8ect lifec(cle. + Tec/nolog( to be i*.le*ente& Tec/nolog( al$o .la($ a 2er( $ignificant role in t/e $ucce$$ or failure of a .ro8ect. Ane t/e one /an&% a new D$tate-of-t/e-artE tec/nolog( *a( increa$e t/e .ro&ucti2it( of t/e tea* an& 'ualit( of t/e .ro&uct. An t/e ot/er /an&% it *a( .ro2e to be un$table an& /ence - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
27

CS605 Software Engineering-II

VU

.ro2e to be &ifficult to /an&le. ,e$ultantl(% it *a( totall( blow (ou off t/e trac4. So% t/e .ro8ect *anager $/oul& be careful in c/oo$ing t/e i*.le*entation tec/nolog( an& *u$t ta4e .ro.er $afeguar& *ea$ure$. + S($te* con$traint$ T/e non-functional re'uire*ent or $($te* con$traint$ $.ecif( t/e con&ition$ an& t/e re$triction$ i*.o$e& on t/e $($te*. 9 $($te* t/at fulfil$ all it$ functional re'uire*ent$ but &oe$ not $ati$f( t/e non-functional re'uire*ent$ woul& be re8ecte& b( t/e u$er. + 1$er re'uire*ent$ 9 $($te* /a$ to $ati$f( it$ u$er re'uire*ent$. =ailing to &o $o woul& ren&er t/i$ $($te* unu$able. + 92ailable re$ource$ 9 .ro8ect /a$ to be &e2elo.e& u$ing t/e a2ailable re$ource$ w/o 4now t/e &o*ain a$ well a$ t/e tec/nolog(. T/e .ro8ect *anager /a$ to en$ure t/at t/e re'uire& nu*ber of re$ource$ wit/ a..ro.riate $4ill-$et i$ a2ailable to t/e .ro8ect.

1ro9ect -anage'ent Concern%


In or&er to .lan an& run a .ro8ect $ucce$$full(% a .ro8ect *anager nee&$ to worr( about t/e following i$$ue$6 1. 3ro&uct 'ualit(6 w/at woul& be t/e acce.table 'ualit( le2el for t/i$ .articular .ro8ect an& /ow coul& it be en$ure&L 2. ,i$4 a$$e$$*ent6 w/at woul& be t/e .otential .roble*$ t/at coul& 8eo.ar&i+e t/e .ro8ect an& /ow coul& t/e( be *itigate&L 3. #ea$ure*ent6 /ow coul& t/e $i+e% .ro&ucti2it(% 'ualit( an& ot/er i*.ortant factor$ be *ea$ure& an& benc/*ar4e&L 4. Co$t e$ti*ation6 /ow coul& co$t of t/e .ro8ect be e$ti*ate&L 5. 3ro8ect $c/e&ule6 /ow coul& t/e $c/e&ule for t/e .ro8ect be co*.ute& an& e$ti*ate&L 6. Cu$to*er co**unication6 w/at 4in& of co**unication wit/ t/e cu$to*er woul& be nee&e& an& /ow coul& it be e$tabli$/e& an& *aintaine& con$i$tentl(L !. Staffing6 /ow *an( .eo.le wit/ w/at 4in& of re$ource$ woul& be nee&e& an& /ow t/at re'uire*ent coul& be fulfille&L . At/er re$ource$6 w/at ot/er /ar&ware an& $oftware re$ource$ woul& be nee&e& for t/e .ro8ectL ". 3ro8ect *onitoring6 /ow t/e .rogre$$ of t/e .ro8ect coul& be *onitore&L T/oroug/ un&er$tan&ing an& a..reciation of t/e$e i$$ue$ lea&$ to t/e 'ue$t for fin&ing $ati$factor( an$wer$ to t/e$e .roble*$ an& i*.ro2e$ t/e c/ance$ for $ucce$$ of a .ro8ect.

!2 1ro9ect% .ail=
9 .ro8ect *anager i$ ta$4e& to en$ure t/e $ucce$$ful &e2elo.*ent of a .ro&uct. Succe$$ cannot be attaine& wit/out un&er$tan&ing t/e rea$on$ for failure. T/e *ain rea$on$ for t/e failure of $oftware .ro8ect$ are6 1. c/anging cu$to*er re'uire*ent$ 2. a*biguou$Oinco*.lete re'uire*ent$ - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
28

CS605 Software Engineering-II 3. 4. 5. 6. !. . unreali$tic &ea&line an /one$t un&ere$ti*ate of effort .re&ictable an&Oor un.re&ictable ri$4$ tec/nical &ifficultie$ *i$co**unication a*ong .ro8ect $taff failure in .ro8ect *anage*ent

VU

T/e fir$t two .oint$ relate to goo& re'uire*ent engineering .ractice$. 1n$table u$er re'uire*ent$ an& continuou$ re'uire*ent cree. /a$ been i&entifie& a$ t/e to. *o$t rea$on for .ro8ect failure. 9*biguou$ an& inco*.lete re'uire*ent$ lea& to un&e$irable .ro&uct t/at i$ re8ecte& b( t/e u$er. 9$ &i$cu$$e& earlier% &eli2er( &ea&line &irectl( influence$ t/e re$ource$ an& 'ualit(. ;it/ a reali$tic &ea&line% c/ance$ of &eli2ering t/e .ro&uct wit/ /ig/ 'ualit( an& rea$onable re$ource$ increa$e tre*en&ou$l( a$ co*.are& to an unreali$tic &ea&line. 9n unreali$tic &ea&line coul& be enforce& b( t/e *anage*ent or t/e client or it coul& be &ue to error in e$ti*ation. In bot/ t/e$e ca$e$ it often re$ult$ in &i$a$ter for t/e .ro8ect. 9 .ro8ect *anager w/o i$ not .re.are& an& wit/out a contingenc( .lan for all $ort$ of .re&ictable an& un.re&ictable ri$4$ woul& .ut t/e .ro8ect in 8eo.ar&( if $uc/ a ri$4 $/oul& /a..en. ,i$4 a$$e$$*ent an& antici.ation of tec/nical an& ot/er &ifficultie$ allow$ t/e .ro8ect *anager to co.e wit/ t/e$e $ituation$. #i$co**unication a*ong t/e .ro8ect $taff i$ anot/er 2er( i*.ortant rea$on for .ro8ect failure. Lac4 of .ro.er coor&ination an& co**unication in a .ro8ect re$ult$ in wa$tage of re$ource$ an& c/ao$.

T!e -anage'ent S*ectru'


Effecti2e .ro8ect *anage*ent focu$e$ on four a$.ect$ of t/e .ro8ect 4nown a$ t/e 4 3:$. T/e$e are6 .eo.le% .ro&uct% .roce$$% an& .ro8ect.

1eo*le
Software &e2elo.*ent i$ a /ig/l( .eo.le inten$i2e acti2it(. In t/i$ bu$ine$$% t/e $oftware factor( co*.ri$e$ of t/e .eo.le wor4ing t/ere. >ence ta4ing care of t/e fir$t 3% t/at i$ .eo.le% $/oul& ta4e t/e /ig/e$t .riorit( on a .ro8ect *anager:$ agen&a.

1roduct
T/e .ro&uct i$ t/e outco*e of t/e .ro8ect. It inclu&e$ all 4in&$ of t/e $oftware $($te*$. No *eaningful .lanning for a .ro8ect can be carrie&-out until all t/e &i*en$ion$ of t/e .ro&uct inclu&ing it$ functional a$ well a$ non-functional re'uire*ent$ are un&er$too& an& all tec/nical an& *anage*ent con$traint$ are i&entifie&.

1roce%%
Ance t/e .ro&uct ob8ecti2e$ an& $co.e /a2e been &eter*ine&% a .ro.er $oftware &e2elo.*ent .roce$$ an& lifec(cle *o&el *u$t be c/o$en to i&entif( t/e re'uire& wor4 .ro&uct$ an& &efine t/e *ile$tone$ in or&er to en$ure $trea*line& &e2elo.*ent acti2itie$. It inclu&e$ t/e $et of all t/e fra*ewor4 acti2itie$ an& $oftware engineering ta$4$ to get t/e 8ob &one.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

29

CS605 Software Engineering-II

VU

1ro9ect
9 .ro8ect co*.ri$e$ of all wor4 t/e re'uire& to *a4e t/e .ro&uct a realit(. In or&er to a2oi& failure% a .ro8ect *anager an& $oftware engineer i$ re'uire& to buil& t/e $oftware .ro&uct in a controlle& an& organi+e& fa$/ion an& run it li4e ot/er .ro8ect$ foun& in *ore concrete &o*ain$. ;e now &i$cu$$ t/e$e 4 in *ore &etail.

1eo*le
In a $tu&( .ubli$/e& b( IEEE% t/e .ro8ect tea* wa$ i&entifie& b( t/e $enior e5ecuti2e$ a$ t/e *o$t i*.ortant contributor to a $ucce$$ful $oftware .ro8ect. >owe2er% unfortunatel(% .eo.le are often ta4en for grante& an& &o no get t/e attention an& focu$ t/e( &e$er2e. T/ere are a nu*ber of .la(er$ t/at .artici.ate in $oftware .roce$$ an& influence t/e outco*e of t/e .ro8ect. T/e$e inclu&e $enior *anager$% .ro8ect Htec/nicalJ *anager$% .ractitioner$% cu$to*er$% an& en&-u$er$. Senior *anager$ &efine t/e bu$ine$$ 2i$ion w/erea$ t/e .ro8ect *anager$ .lan% *oti2ate% organi+e an& control t/e .ractitioner$ w/o wor4 to &e2elo. t/e $oftware .ro&uct. To be effecti2e% t/e .ro8ect tea* *u$t be organi+e& to u$e eac/ in&i2i&ual to t/e be$t of /i$O/er abilitie$. T/i$ 8ob i$ carrie& out b( t/e tea* lea&er.

Tea' Leader
3ro8ect *anage*ent i$ a .eo.le inten$i2e acti2it(. It nee&$ t/e rig/t *i5 of .eo.le $4ill$. T/erefore% co*.etent .ractitioner$ often *a4e .oor tea* lea&er$. Lea&er$ $/oul& a..l( a .roble* $ol2ing *anage*ent $t(le. T/at i$% a .ro8ect *anager $/oul& concentrate on un&er$tan&ing t/e .roble* to be $ol2e&% *anaging t/e flow of i&ea$% an& at t/e $a*e ti*e% letting e2er(one on t/e tea* 4now t/at 'ualit( count$ an& t/at it will not be co*.ro*i$e&. #AI *o&el of lea&er$/i. &e2elo.e& b( ;einberg $ugge$t t/at a lea&er$/i. nee&$ #oti2ation% Argani+ation% an& Inno2ation. -oti,ation i$ t/e abilit( to encourage tec/nical .eo.le to .ro&uce to t/eir be$t. /rgani8ation i$ t/e abilit( to *ol& t/e e5i$ting .roce$$e$ Hor in2ent new one$J t/at will enable t/e initial conce.t to be tran$late& into a final .ro&uct% an& Idea or Inno,ation i$ t/e abilit( to encourage .eo.le to create an& feel creati2e. It i$ $ugge$te& t/at $ucce$$ful .ro8ect *anager$ a..l( a .roble* $ol2ing *anage*ent $t(le. T/i$ in2ol2e$ &e2elo.ing an un&er$tan&ing of t/e .roble* an& *oti2ating t/e tea* to generate i&ea$ to $ol2e t/e .roble*. E&ge*on $ugge$t$ t/at t/e following c/aracteri$tic$ are nee&e& to beco*e an effecti2e .ro8ect *anager6 $ $ 3roble* Sol2ing + S/oul& be able to &iagno$e tec/nical an& organi+ational i$$ue$ an& be willing to c/ange &irection if nee&e&. #anagerial I&entit( + #u$t /a2e t/e confi&ence to ta4e control w/en nece$$ar(

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

30

CS605 Software Engineering-II $ $

VU

9c/ie2e*ent + ,ewar& initiati2e Hcontrolle& ri$4 ta4ingJ an& acco*.li$/*ent Influence an& tea* buil&ing + #u$t re*ain un&er control in /ig/ $tre$$ con&ition$. S/oul& be able to rea& $ignal$ an& a&&re$$ .eo.le$: nee&$.

7e#arco $a($ t/at a goo& lea&er .o$$e$$e$ t/e following four c/aracteri$tic$6 + >eart6 t/e lea&er $/oul& /a2e a big /eart. + No$e6 t/e lea&er $/oul& /a2e goo& no$e to $.ot t/e trouble an& ba& $*ell in t/e .ro8ect. + Gut6 t/e lea&er $/oul& /a2e t/e abilit( to *a4e 'uic4 &eci$ion$ on gut feeling. + Soul6 t/e lea&er $/oul& be t/e $oul of t/e tea*. If anal(+e& clo$el(% all t/e$e re$earc/er$ $ee* to $a( e$$entiall( t/e $a*e t/ing an& t/e( actuall( co*.le*ent eac/ ot/er:$ .oint of 2iew.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

31

CS605 Software Engineering-II

VU

Lecture No. > T!e Software Tea'


T/ere are *an( .o$$ible organi+ational $tructure$. In or&er to i&entif( t/e *o$t $uitable $tructure% t/e following factor$ *u$t be con$i&ere&6 $ $ $ $ $ $ $ t/e &ifficult( of t/e .roble* to be $ol2e& t/e $i+e of t/e re$ultant .rogra*H$J in line$ of co&e or function .oint$ t/e ti*e t/at t/e tea* will $ta( toget/er Htea* lifeti*eJ t/e &egree to w/ic/ t/e .roble* can be *o&ulari+e& t/e re'uire& 'ualit( an& reliabilit( of t/e $($te* to be built t/e rigi&it( of t/e &eli2er( &ate t/e &egree of $ociabilit( Hco**unicationJ re'uire& for t/e .ro8ect

Con$tantine $ugge$t$ t/at tea*$ coul& be organi+e& in t/e following generic $tructural .ara&ig*$6 $ $ $ $ clo%ed *aradig'N$tructure$ a tea* along a tra&itional /ierarc/( of aut/orit( rando' *aradig'N$tructure$ a tea* loo$el( an& &e.en&$ on in&i2i&ual initiati2e of t/e tea* *e*ber$ o*en *aradig'Natte*.t$ to $tructure a tea* in a *anner t/at ac/ie2e$ $o*e of t/e control$ a$$ociate& wit/ t/e clo$e& .ara&ig* but al$o *uc/ of t/e inno2ation t/at occur$ w/en u$ing t/e ran&o* .ara&ig* %2nc!ronou% *aradig'Nrelie$ on t/e natural co*.art*entali+ation of a .roble* an& organi+e$ tea* *e*ber$ to wor4 on .iece$ of t/e .roble* wit/ little acti2e co**unication a*ong t/e*$el2e$

#antei $ugge$t$ t/e following t/ree generic tea* organi+ation$6 $ 7e*ocratic &ecentrali+e& H77J In t/i$ organi+ation t/ere i$ no .er*anent lea&er an& ta$4 coor&inator$ are a..ointe& for $/ort &uration. 7eci$ion$ on .roble*$ an& a..roac/ are *a&e b( grou. con$en$u$ an& co**unication a*ong tea* i$ /ori+ontal. $ Controlle& &ecentrali+e& HC7J In C7% t/ere i$ a &efine& lea&er w/o coor&inate$ $.ecific ta$4$. >owe2er% .roble* $ol2ing re*ain$ a grou. acti2it( an& co**unication a*ong $ubgrou.$ an& in&i2i&ual$ i$ /ori+ontal. 0ertical co**unication along t/e control /ierarc/( al$o occur$. $ Controlle& centrali+e& HCCJ In a Controlle& Centrali+e& $tructure% to. le2el .roble* $ol2ing an& internal tea* coor&ination are *anage& b( t/e tea* lea&er an& co**unication between t/e lea&er an& tea* *e*ber$ i$ 2ertical. Centrali+e& $tructure$ co*.lete ta$4$ fa$ter an& are *o$t u$eful for /an&ling $i*.le .roble*$. An t/e ot/er /an&% &ecentrali+e& tea*$ generate *ore an& better $olution$ t/an in&i2i&ual$ an& are *o$t u$eful for co*.le5 .roble*$ =or t/e tea* *orale .oint of 2iew% 77 i$ better.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

32

CS605 Software Engineering-II

VU

Coordination and Co''unication I%%ue%


Lac4 of coor&ination re$ult$ in confu$ion an& uncertaint(. An t/e ot/er /an&% .erfor*ance i$ in2er$el( .ro.ortional to t/e a*ount of co**unication an& /ence too *uc/ co**unication an& coor&ination i$ al$o not /ealt/( for t/e .ro8ect. 0er( large .ro8ect$ are be$t a&&re$$e& wit/ CC or C7 w/en $ub-grou.ing can be ea$il( acco**o&ate&. Iraul an& Steeter categori+e t/e .ro8ect coor&ination tec/ni'ue$ a$ follow$6 $ =or*al% i*.er$onal a..roac/e$ In t/e$e a..roac/e$% coor&ination i$ ac/ie2e& t/roug/ i*.er$onal an& for*al *ec/ani$* $uc/ a$ SE &ocu*ent$% tec/nical *e*o$% $c/e&ule$% error trac4ing re.ort$. $ =or*al% inter.er$onal .roce&ure$ In t/i$ ca$e% t/e a..roac/e$ are inter.er$onal an& for*al. T/e$e inclu&e @9 acti2itie$% &e$ign an& co&e re2iew$% an& $tatu$ *eeting$. $ Infor*al% inter.er$onal .roce&ure$ T/i$ a..roac/ e*.lo($ infor*al inter.er$onal .roce&ure$ an& inclu&e$ grou. *eeting$ an& collocating &ifferent grou.$ toget/er. $ Electronic co**unication inclu&e$ e*ail$ an& bulletin boar&$. $ Inter.er$onal networ4ing inclu&e$ infor*al &i$cu$$ion$ wit/ grou. *e*ber$ T/e effecti2ene$$ of t/e$e a..roac/e$ /a$ been $u**ari+e& in t/e following &iagra*6

Tec/ni'ue$ t/at fall abo2e t/e regre$$ion line (iel& *ore 2alue to u$e ratio a$ co*.are& to t/e one$ below t/e line.

T!e 1roduct< +efining t!e 1roble'

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

33

CS605 Software Engineering-II

VU

In or&er to &e2elo. an e$ti*ate an& .lan for t/e .ro8ect% t/e $co.e of t/e .roble* *u$t be e$tabli$/e&. T/i$ inclu&e$ conte5t% infor*ation ob8ecti2e$% an& function an& .erfor*ance re'uire*ent$. T/e e$ti*ate an& .lan i$ t/en &e2elo.e& b( &eco*.o$ing t/e .roble* an& e$tabli$/ing a functional .artitioning.

T!e 1roce%%
T/e ne5t $te. i$ to &eci&e w/ic/ .roce$$ *o&el to .ic4. T/e .ro8ect *anager /a$ to loo4 at t/e c/aracteri$tic$ of t/e .ro&uct to be built an& t/e .ro8ect en2iron*ent. =or e5a*.le$% for a relati2el( $*all .ro8ect t/at i$ $i*ilar to .a$t effort$% &egree of uncertaint( i$ *ini*i+e& an& /ence ;aterfall or linear $e'uential *o&el coul& be u$e&. =or tig/t ti*eline$% /ea2il( co*.art*entali+e&% an& 4nown &o*ain% ,97 *o&el woul& be *ore $uitable. 3ro8ect$ wit/ large functionalit(% 'uic4 turn aroun& ti*e are be$t &e2elo.e& incre*entall( an& for a .ro8ect in w/ic/ re'uire*ent$ are uncertain% .rotot(.ing *o&el will be *ore $uitable.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

34

CS605 Software Engineering-II

VU

Lecture No. ? T!e 1ro9ect -anage'ent


9$ &i$cu$$e& earlier% a .ro8ect *anager *u$t un&er$tan& w/at can go wrong an& /ow to &o it rig/t. ,eel /a$ &efine& a 5 $te. .roce$$ to i*.ro2e t/e c/ance$ of $ucce$$. T/e$e are6 + Start on t/e rig/t foot6 t/i$ i$ acco*.li$/e& b( .utting in t/e re'uire& effort to un&er$tan& t/e .roble*% $et reali$tic ob8ecti2e$% buil& t/e rig/t tea*% an& .ro2i&e t/e nee&e& infra$tructure. + #aintain *o*entu*6 *an( .ro8ect$% after $tarting on t/e rig/t% loo$e focu$ an& *o*entu*. T/e initial *o*entu* *u$t be *aintaine& till t/e 2er( en&. + Trac4 .rogre$$6 no .lanning i$ u$eful if t/e .rogre$$ i$ not trac4e&. Trac4ing en$ure$ ti*el( &eli2er( an& re*e&ial action% if nee&e&% in a $uitable *anner. + #a4e $*art &eci$ion$ + Con&uct a .o$t*orte* anal($i$6 in or&er to learn fro* t/e *i$ta4e$ an& i*.ro2e t/e .roce$$ continuou$l(% a .ro8ect .o$t*orte* *u$t be con&ucte&.

5@@ 1rinci*le
)arr( )oe/* /a$ $ugge$te& a $($te*atic a..roac/ to .ro8ect *anage*ent. It i$ 4nown a$ t/e ;;;;;>> .rinci.le. It co*.ri$e$ of ! 'ue$tion$. =in&ing t/e an$wer$ to t/e$e ! 'ue$tion$ i$ e$$entiall( all a .ro8ect *anager /a$ to &o. T/e$e are6 $ @A i$ t/e $($te* being &e2elo.e&L $ @#T will be &oneL $ )( @ENL $ @/ i$ re$.on$ible for a functionL $ @E4E t/e( are organi+ationall( locate&L $ @/ will t/e 8ob be &one tec/nicall( an& *anageriall(L $ @/ -UC@ of eac/ re$ource He.g.% .eo.le% $oftware% tool$% &ataba$eJ will be nee&e&L )oe/*:$ ;5>> .rinci.le i$ a..licable% regar&le$$ of t/e $i+e an& co*.le5it( of t/e .ro8ect an& .ro2i&e e5cellent .lanning outline.

Critical 1ractice%
T/e 9irlie Council /a$ &e2elo.e& a li$t of critical $ucce$$ .ractice$ t/at *u$t be .re$ent for $ucce$$ful .ro8ect *anage*ent. T/e$e are6 $ =or*al ri$4 anal($i$ $ E*.irical co$t an& $c/e&ule e$ti*ation $ #etric$-ba$e& .ro8ect *anage*ent $ Earne& 2alue trac4ing $ 7efect trac4ing again$t 'ualit( target$ $ 3eo.le aware .ro8ect *anage*ent

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

35

CS605 Software Engineering-II

VU

=in&ing t/e $olution to t/e$e .ractice$ i$ t/e 4e( to $ucce$$ful .ro8ect$. ;e:ll t/erefore $.en& a con$i&erable a*ount of ti*e in elaborating t/e$e .ractice$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

36

CS605 Software Engineering-II

VU

Lecture No. B Software Si8e E%ti'ation


T/e $i+e of t/e $oftware nee&$ to be e$ti*ate& to figure out t/e ti*e nee&e& in ter*$ of calen&ar an& *an *ont/$ a$ well a$ t/e nu*ber an& t(.e of re$ource$ re'uire& carr(ing out t/e 8ob. T/e ti*e an& re$ource$ e$ti*ation e2entuall( .la($ a $ignificant role in &eter*ining t/e co$t of t/e .ro8ect. #o$t organi+ation$ u$e t/eir .re2iou$ e5.erience to e$ti*ate t/e $i+e an& /ence t/e re$ource an& ti*e re'uire*ent$ for t/e .ro8ect. If not 'uantifie&% t/i$ e$ti*ate i$ $ub8ecti2e an& i$ a$ goo& a$ t/e .er$on w/o i$ con&ucting t/i$ e5erci$e. 9t ti*e$ t/i$ *a4e$ it /ig/l( contentiou$. It i$ t/erefore i*.erati2e for a go2ern*ent organi+ation to a&o.t an e$ti*ation *ec/ani$* t/at i$6 1. 2. 3. 4. 5. Ab8ecti2e in nature. It $/oul& be an acce.table $tan&ar& wit/ wi&e $.rea& u$e an& acce.tance le2el. It $/oul& $er2e a$ a $ingle (ar&$tic4 to *ea$ure an& *a4e co*.ari$on$. #u$t be ba$e& u.on a &eli2erable t/at i$ *eaningful to t/e inten&e& au&ience. It $/oul& be in&e.en&ent of t/e tool an& tec/nolog( u$e& for t/e &e2elo.ing t/e $oftware.

9 nu*ber of tec/ni'ue$ an& tool$ can be u$e& in e$ti*ating t/e $i+e of t/e $oftware. T/e$e inclu&e6 1. Line$ of co&e HLACJ 2. Nu*ber of ob8ect$ 3. Nu*ber of G1I$ 4. Nu*ber of &ocu*ent .age$ 5. =unctional .oint$ H=3J

Co'*ari%on of L/C and .1#


Aut of t/e$e 5% t/e two *o$t wi&el( u$e& *etric$ for t/e *ea$ure*ent of $oftware $i+e are =3 an& LAC. LAC *etric $uffer fro* t/e following $/ortco*ing$6 1. T/ere are a nu*ber of 'ue$tion$ regar&ing t/e &efinition for line$ of co&e. T/e$e inclu&e6 a. ;/et/er to count ./($ical line or logical line$L b. ;/at t(.e of line$ $/oul& be counte&L =or e5a*.le% $/oul& t/e co**ent$% &ata &efinition$% an& blan4 line$ be counte& or notL 2. LAC i$ /ea2il( &e.en&ent u.on t/e in&i2i&ual .rogra**ing $t(le. 3. It i$ &e.en&ent u.on t/e tec/nolog( an& /ence it i$ &ifficult to co*.are a..lication$ &e2elo.e& in two &ifferent language$. T/i$ i$ true for e2en $ee*ingl( 2er( clo$e language$ li4e in CPP an& ?a2a. 4. If a *i5ture of language$ an& tool$ i$ u$e& t/en t/e co*.ari$on i$ e2en *ore &ifficult. =or e5a*.le% it i$ not .o$$ible to co*.are a .ro8ect t/at &eli2er$ a 100%000-line *i5ture of 9$$e*bl(% CPP% S@L an& 0i$ual )a$ic to one t/at &eli2er$ 100%000 line$ of CA)AL.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

37

CS605 Software Engineering-II

VU

=3 *ea$ure$ t/e $i+e of t/e functionalit( .ro2i&e& b( t/e $oftware. T/e functionall( i$ *ea$ure& a$ a function of t/e &ata an& t/e o.eration$ .erfor*e& on t/at &ata. T/e *ea$ure i$ in&e.en&ent of t/e tool an& tec/nolog( u$e& an& /ence .ro2i&e$ a con$i$tent *ea$ure for co*.ari$on between 2ariou$ organi+ation$ an& .ro8ect$. T/e bigge$t a&2antage of =3 o2er LAC i$ t/at LAC can be counte& onl( 9=TE, t/e co&e /a$ been &e2elo.e& w/ile =3 can be counte& e2en at t/e re'uire*ent ./a$e an& /ence can be u$e& for .lanning an& e$ti*ation w/ile t/e LAC cannot be u$e& for t/i$ .ur.o$e. 9not/er *a8or &i$tinction between t/e =3 an& LAC i$ t/at t/e LAC *ea$ure$ t/e a..lication fro* a &e2elo.erQ$ .er$.ecti2e w/ile t/e =3 i$ a *ea$ure of t/e $i+e of t/e functionalit( fro* t/e u$erQ$ .er$.ecti2e. T/e u$erQ$ 2iew% a$ &efine& b( I=31G% i$ a$ follow$6 9 user view i$ a &e$cri.tion of t/e bu$ine$$ function$ an& i$ a..ro2e& b( t/e u$er. It re.re$ent$ a for*al &e$cri.tion of t/e u$er:$ bu$ine$$ nee&$ in t/e u$er:$ language. It can 2ar( in ./($ical for* He.g.% catalog of tran$action$% .ro.o$al$% re'uire*ent$ &ocu*ent% e5ternal $.ecification$% &etaile& $.ecification$% u$er /an&boo4J. 7e2elo.er$ tran$late t/e u$er infor*ation into infor*ation tec/nolog( language in or&er to .ro2i&e a $olution. =unction .oint count$ t/e a..lication $i+e fro* t/e u$er:$ .oint of 2iew. It i$ acco*.li$/e& u$ing t/e infor*ation in a language t/at i$ co**on to bot/ u$erH$J an& &e2elo.er$. T/erefore% =unction 3oint 9nal($i$ *ea$ure$ t/e $i+e of t/e functionalit( &eli2ere& an& u$e& b( t/e en& u$er a$ o..o$e& to t/e 2olu*e of t/e artifact$ an& co&e.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

38

CS605 Software Engineering-II

VU

ource Code i-e Acti"ity ( in #erson months Requirements Design Coding Documentation Integration and Testing Management Total 4ffort Total Cost Cost Per 6ine 6ines Per Person(Month

Assem!ler ,ersion Ada ,ersion Difference .//'/// 01'/// (21'/// ./ 01 .// .1 01 01 0// 5.'///'/// 5./ 1// ./ 01 0/ .1 .1 .1 .// 51//'/// 50/ 01/ / / (3/ / (./ (./ (.// (51//'/// 5./ (01/

T!e 1arado) of 4e,er%ed 1roducti,it2 for @ig!-Le,el Language%


Con$i&er t/e following e5a*.le6 In t/i$ e5a*.le% it i$ a$$u*e& t/at t/e $a*e functionalit( i$ i*.le*ente& in 9$$e*bl( an& 9&a. 9$ co&ing in 9$$e*bl( i$ *uc/ *ore &ifficult an& ti*e con$u*ing a$ co*.are& to 9&a% it ta4e$ *ore ti*e an& it i$ al$o lengt/(. )ecau$e t/ere i$ a /uge &ifference in t/e co&e $i+e in ter*$ of Line$ of Co&e% t/e co$t .er line in ca$e of 9$$e*bl( i$ *uc/ le$$ a$ co*.are& to 9&a. >ence co&ing in 9$$e*bl( a..ear$ to be *ore co$t effecti2e t/an 9&a w/ile in realit( it i$ not. T/i$ i$ a .ara&o5R

.unction 1oint #nal2%i% - # "rief @i%tor2 and U%age


In t/e *i& !0Q$% I)# felt t/e nee& to e$tabli$/ a *ore effecti2e an& better *ea$ure of $($te* $i+e to .re&ict t/e &eli2er( of $oftware. It co**i$$ione& 9llan 9lbrec/t to lea& t/i$ effort. 9$ a re$ult /e &e2elo.e& t/i$ a..roac/ w/ic/ to&a( 4nown a$ t/e =unction 3oint 9nal($i$. 9fter $e2eral (ear$ of internal u$e% 9lbrec/t intro&uce& t/e *et/o&olog( at a 8ointO$/are conference. =ro* 1"!" to 1" 4 continue& $tati$tical anal($i$ wa$ .erfor*e& on t/e *et/o& an& refine*ent$ were *a&e. 9t t/at .oint% a non-.rofit organi+ation b( t/e na*e of International =unction 3oint 1$er Grou. HI=31GJ wa$ for*e& w/ic/ for*all( too4 onto it$elf t/e role of refining an& &efining t/e counting rule$. T/e re$ult i$ t/e function .oint *et/o&olog( t/at we u$e to&a(. Since 1"!"% w/en 9lbrec/t .ubli$/e& /i$ fir$t .a.er on =3% it$ .o.ularit( an& u$e /a$ been increa$ing con$i$tentl( an& to&a( it i$ being u$e& a$ a &e facto $tan&ar& for $oftware *ea$ure*ent. =ollowing i$ a $/ort li$t of organi+ation$ u$ing =3 for e$ti*ation6 1. IEEE reco**en&$ it for u$e in .ro&ucti2it( *ea$ure*ent an& re.orting. 2. Se2eral go2ern*ent$ inclu&ing 1I% Cana&a% an& >ong Iong /a2e been u$ing it an& it /a$ been reco**en&e& to t/e$e go2ern*ent$ t/at all .ublic $ector .ro8ect u$e =3 a$ a $tan&ar& for t/e *ea$ure*ent of t/e $oftware $i+e.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

39

CS605 Software Engineering-II

VU

3. Go2ern*ent of t/e 9u$tralian $tate 0ictoria /a$ been u$ing =3 $ince 1""! for *anaging an& out$ourcing .ro8ect$ to t/e tune of 1SS 50 #illion e2er( (ear. 4. In t/e 1S $e2eral large go2ern*ent &e.art*ent$ inclu&ing I,S /a2e a&o.te& =3 anal($i$ a$ a $tan&ar& for out$ourcing% *ea$ure*ent% an& control of $oftware .ro8ect$. 5. 9 nu*ber of big organi+ation$ inclu&ing 7igital Cor.oration an& I)# /a2e been u$ing =3 for t/eir internal u$e for t/e la$t *an( (ear$. 1$age of =3 inclu&e$6 Effort Sco.e E$ti*ation 3ro8ect 3lanning 7eter*ine t/e i*.act of a&&itional or c/ange& re'uire*ent$ ,e$ource 3lanningO9llocation )enc/*ar4ing an& target $etting Contract Negotiation$ =ollowing i$ a li$t of $o*e of t/e =3 ba$e& *etric$ u$e& for t/e$e .ur.o$e$6 Si+e F =unction 3oint$ 7efect$ F 3er =unction 3oint Effort F Staff-#ont/$ 3ro&ucti2it( F =unction 3oint$ .er Staff-#ont/ 7uration F Sc/e&ule HCalen&arJ #ont/$ Ti*e Efficienc( F =unction 3oint$ .er #ont/ Co$t F 3er =unction

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

40

CS605 Software Engineering-II

VU

Lecture No. 10 .unction 1oint Counting 1roce%%


T/e following &iagra* &e.ict$ t/e function .oint counting .roce$$.

7eter*ine t/e t(.e of count


En/ance*ent 7e2elo.*ent 9..lication

7efine t/e a..lication boun&ar( Count Tran$actional =unction$


EI EA E@

Count 7ata =unction$

Calculate 0alue 9&8u$t*ent =actor H09=J Contribution of 15 general %2%te' c!aracteri%tic%

Calculate 1na&8u$te& =3 Count H1=3J


Tran$actional =unction$ P 7ata =unction$

IL= EI=

Calculate 9&8u$te& =3 Count


1=3 T 09=

T/e$e $te.$ are elaborate& in t/e following $ub$ection$. T/e ter*$ an& &efinition$ are t/e one$ u$e& b( I=31G an& /a2e been ta4en &irectl( fro* t/e I=31G =unction 3oint Counting 3ractice$ #anual HC3#J ,elea$e 4.1. T/e following can t/erefore be treate& a$ an abri&ge& 2er$ion of t/e I=31G C3# ,elea$e 4.1.

+eter'ining t!e t2*e of count


9 =unction 3oint count *a( be &i2i&e& into t/e following t(.e$6 1. +e,elo*'ent Count6 9 &e2elo.*ent function .oint count inclu&e$ all function$ i*.acte& Hbuilt or cu$to*i+e&J b( t/e .ro8ect acti2itie$. 2. En!ance'ent Count6 9n en/ance*ent function .oint count inclu&e$ all t/e function$ being a&&e&% c/ange& an& &elete&. T/e boun&ar( of t/e a..licationH$J i*.acte& re*ain$ t/e $a*e. T/e functionalit( of t/e a..licationH$J reflect$ t/e i*.act of t/e function$ being a&&e&% c/ange& or &elete&. 3. #**lication Count6 9n a..lication function .oint count *a( inclu&e% &e.en&ing on t/e .ur.o$e He.g.% .ro2i&e a .ac4age a$ t/e $oftware $olutionJ6 aJ onl( t/e function$ being u$e& b( t/e u$er

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

41

CS605 Software Engineering-II

VU

bJ all t/e function$ &eli2ere& cJ T/e a..lication boun&ar( of t/e two count$ i$ t/e $a*e an& i$ in&e.en&ent of t/e scope.

+efining t!e #**lication "oundar2


T/e a..lication boun&ar( i$ ba$icall( t/e $($te* conte5t &iagra* an& &eter*ine$ t/e $co.e of t/e count. It in&icate$ t/e bor&er between t/e $oftware being *ea$ure& an& t/e u$er. It i$ t/e conce.tual interface between t/e Uinternal: a..lication an& t/e Ue5ternal: u$er worl&. It &e.en&$ u.on t/e u$er:$ e5ternal 2iew of t/e $($te* an& i$ in&e.en&ent of t/e tool an& tec/nolog( u$e& to acco*.li$/ t/e ta$4. T/e .o$ition of t/e a..lication boun&ar( i$ i*.ortant becau$e it i*.act$ t/e re$ult of t/e function .oint count. T/e a..lication boun&ar( a$$i$t$ in i&entif(ing t/e &ata entering t/e a..lication t/at will be inclu&e& in t/e $co.e of t/e count.

Count +ata .unction%


Count of t/e &ata function$ i$ contribution of t/e &ata *ani.ulate& an& u$e& b( t/e a..lication towar&$ t/e final function .oint count. T/e &ata i$ &i2i&e& into two categorie$6 t/e &nternal 'ogical Files HIL=J an& t/e External &nterface Files HEI=J. T/e$e an& t/e relate& conce.t$ are &efine& an& e5.laine& a$ follow$.

Internal Logical .ile% 6IL.7


9n internal logical file HIL=J i$ a u$er i&entifiable grou. of logicall( relate& &ata or control infor*ation *aintaine& wit/in t/e boun&ar( of t/e a..lication. T/e .ri*ar( intent of an IL= i$ to /ol& &ata *aintaine& t/roug/ one or *ore ele*entar( .roce$$e$ of t/e a..lication being counte&.

E)ternal Interface .ile%


9n e5ternal interface file HEI=J i$ a u$er i&entifiable grou. of logicall( relate& &ata or control infor*ation reference& b( t/e a..lication% but *aintaine& wit/in t/e boun&ar( of anot/er a..lication. T/e .ri*ar( intent of an EI= i$ to /ol& &ata reference& t/roug/ one or *ore ele*entar( .roce$$e$ wit/in t/e boun&ar( of t/e a..lication counte&. T/i$ *ean$ an EI= counte& for an a..lication *u$t be in an IL= in anot/er a..lication.

+ifference between IL.% and EI.%


T/e .ri*ar( &ifference between an internal logical file an& an e5ternal interface file i$ t/at an EI= i% not *aintaine& b( t/e a..lication being counte&% w/ile an IL= i$.

+efinition% for E'bedded Ter'%


T/e following .aragra./$ furt/er &efine IL=$ an& EI=$ b( &efining e*be&&e& ter*$ wit/in t/e &efinition$.

Control Infor'ation
- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
42

CS605 Software Engineering-II

VU

(ontrol &nformation i$ &ata t/at influence$ an ele*entar( .roce$$ of t/e a..lication being counte&. It $.ecifie$ w/at% w/en% or /ow &ata i$ to be .roce$$e&. =or e5a*.le% $o*eone in t/e .a(roll &e.art*ent e$tabli$/e$ .a(*ent c(cle$ to $c/e&ule w/en t/e e*.lo(ee$ for eac/ location are to be .ai&. T/e .a(*ent c(cle% or $c/e&ule% contain$ ti*ing infor*ation t/at affect$ w/en t/e ele*entar( .roce$$ of .a(ing e*.lo(ee$ occur$.

U%er Identifiable
T/e ter* user identifiable refer$ to &efine& re'uire*ent$ for .roce$$e$ an&Oor grou.$ of &ata t/at are agree& u.on% an& un&er$too& b(% bot/ t/e u$erH$J an& $oftware &e2elo.erH$J. =or e5a*.le% u$er$ an& $oftware &e2elo.er$ agree t/at a >u*an ,e$ource$ 9..lication will *aintain an& $tore E*.lo(ee infor*ation in t/e a..lication.

-aintained
T/e ter* maintained i$ t/e abilit( to *o&if( &ata t/roug/ an ele*entar( .roce$$. E5a*.le$ inclu&e% but are not li*ite& to% a&&% c/ange% &elete% .o.ulate% re2i$e% u.&ate% a$$ign% an& create.

Ele'entar2 1roce%%
9n elementary process i$ t/e $*alle$t unit of acti2it( t/at i$ *eaningful to t/e u$erH$J. =or e5a*.le% a u$er re'uire$ t/e abilit( to a&& a new e*.lo(ee to t/e a..lication. T/e u$er &efinition of e*.lo(ee inclu&e$ $alar( an& &e.en&ent infor*ation. =ro* t/e u$er .er$.ecti2e% t/e $*alle$t unit of acti2it( i$ to a&& a new e*.lo(ee. 9&&ing one of t/e .iece$ of infor*ation% $uc/ a$ $alar( or &e.en&ent% i$ not an acti2it( t/at woul& 'ualif( a$ an ele*entar( .roce$$. T/e elementary process *u$t be $elf-containe& an& lea2e t/e bu$ine$$ of t/e a..lication being counte& in a con$i$tent $tate. =or e5a*.le% t/e u$er re'uire*ent$ to a&& an e*.lo(ee inclu&e $etting u. $alar( an& &e.en&ent infor*ation. If all t/e e*.lo(ee infor*ation i$ not a&&e&% an e*.lo(ee /a$ not (et been create&. 9&&ing $o*e of t/e infor*ation alone lea2e$ t/e bu$ine$$ of a&&ing an e*.lo(ee in an incon$i$tent $tate. If bot/ t/e e*.lo(ee $alar( an& &e.en&ent infor*ation i$ a&&e&% t/i$ unit of acti2it( i$ co*.lete& an& t/e bu$ine$$ i$ left in a con$i$tent $tate.

IL.CEI. Counting 4ule%


T/i$ $ection &efine$ t/e rule$ t/at a..l( w/en counting internal logical file$ an& e5ternal interface file$.

Su''ar2 of Counting 1rocedure%


T/e IL= an& EI= counting .roce&ure$ inclu&e t/e following two acti2itie$6 1J I&entif( t/e IL=$ an& EI=$. 2J 7eter*ine t/e IL= or EI= co*.le5it( an& t/eir contribution to t/e una&8u$te& function .oint count. IL= an& EI= counting rule$ are u$e& for eac/ acti2it(. T/ere are two t(.e$ of rule$6 VWI&entification rule$ VWCo*.le5it( an& contribution rule$

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

43

CS605 Software Engineering-II

VU

T/e following li$t outline$ /ow t/e rule$ are .re$ente&6 VWIL= i&entification rule$ VWEI= i&entification rule$ VWCo*.le5it( an& contribution rule$% w/ic/ inclu&e6 VW7ata ele*ent t(.e$ H7ET$J VW,ecor& ele*ent t(.e$ H,ET$J

IL. Identification 4ule%


To i&entif( IL=$% loo4 for grou.$ of &ata or control infor*ation t/at $ati$f( t/e &efinition of an IL=. 9ll of t/e following counting rule$ *u$t a..l( for t/e infor*ation to be counte& a$ an IL=. T/e grou. of &ata or control infor*ation i$ logical an& u$er i&entifiable. T/e grou. of &ata i$ *aintaine& t/roug/ an ele*entar( .roce$$ wit/in t/e a..lication boun&ar( being counte&.

EI. Identification 4ule%


To i&entif( EI=$% loo4 for grou.$ of &ata or control infor*ation t/at $ati$f( t/e &efinition of an EI=. 9ll of t/e following counting rule$ *u$t a..l( for t/e infor*ation to be counte& a$ an EI=. T/e grou. of &ata or control infor*ation i$ logical an& u$er i&entifiable. T/e grou. of &ata i$ reference& b(% an& e5ternal to% t/e a..lication being counte&. T/e grou. of &ata i% not 'aintained b( t/e a..lication being counte&. T/e grou. of &ata i$ *aintaine& in an IL= of anot/er a..lication.

Co'*le)it2 and Contribution +efinition% and 4ule%


T/e nu*ber of IL=$% EI=$% an& t/eir relati2e functional co*.le5it( &eter*ine t/e contribution of t/e &ata function$ to t/e una&8u$te& function .oint count. 9$$ign eac/ i&entifie& IL= an& EI= a functional co*.le5it( ba$e& on t/e nu*ber of &ata ele*ent t(.e$ H7ET$J an& recor& ele*ent t(.e$ H,ET$J a$$ociate& wit/ t/e IL= or EI=. T/i$ $ection &efine$ 7ET$ an& ,ET$ an& inclu&e$ t/e counting rule$ for eac/.

+ET +efinition
9 data element type i$ a uni'ue u$er recogni+able% non-re.eate& fiel&.

+ET 4ule%
T/e following rule$ a..l( w/en counting 7ET$6 1. Count a 7ET for eac/ uni'ue u$er recogni+able% non-re.eate& fiel& *aintaine& in or retrie2e& fro* t/e IL= or EI= t/roug/ t/e e5ecution of an ele*entar( .roce$$. =or e5a*.le6 9n account nu*ber t/at i$ $tore& in *ulti.le fiel&$ i$ counte& a$ one 7ET.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

44

CS605 Software Engineering-II

VU

9 before or after i*age for a grou. of 10 fiel&$ *aintaine& for au&it .ur.o$e$ woul& count a$ one 7ET for t/e before i*age Hall 10 fiel&$J an& a$ one 7ET for t/e after i*age Hall 10 fiel&$J for a total of 2 7ET$. T/e re$ultH$J of a calculation fro* an ele*entar( .roce$$% $uc/ a$ calculate& $ale$ ta5 2alue for a cu$to*er or&er *aintaine& on an IL= i$ counte& a$ one 7ET on t/e cu$to*er or&er IL=. 9cce$$ing t/e .rice of an ite* w/ic/ i$ $a2e& to a billing file or fiel&$ $uc/ a$ a ti*e $ta*. if re'uire& b( t/e u$erH$J are counte& a$ 7ET$. If an e*.lo(ee nu*ber w/ic/ a..ear$ twice in an IL= or EI= a$ H1J t/e 4e( of t/e e*.lo(ee recor& an& H2J a foreign 4e( in t/e &e.en&ent recor&% count t/e 7ET onl( once. ;it/in an IL= or EI=% count one 7ET for t/e 12 #ont/l( )u&get 9*ount fiel&$. Count one a&&itional fiel& to i&entif( t/e a..licable *ont/. =or E5a*.le6 2. ;/en two a..lication$ *aintain an&Oor reference t/e $a*e IL=OEI=% but eac/ *aintain$Oreference$ $e.arate 7ET$% count onl( t/e 7ET$ being u$e& b( eac/ a..lication to $i+e t/e IL=OEI=. =or E5a*.le6 9..lication 9 *a( $.ecificall( i&entif( an& u$e an a&&re$$ a$ $treet a&&re$$% cit(% $tate an& +i. co&e. 9..lication ) *a( $ee t/e a&&re$$ a$ one bloc4 of &ata wit/out regar& to in&i2i&ual co*.onent$. 9..lication 9 woul& count four 7ET$C 9..lication ) woul& count one 7ET. 9..lication M *aintain$ an&Oor reference$ an IL= t/at contain$ a SSN% Na*e% Street Na*e% #ail Sto.% Cit(% State% an& Xi.. 9..lication X *aintain$ an&Oor reference$ t/e Na*e% Cit(% an& State. 9..lication M woul& count $e2en 7ET$C 9..lication X woul& count t/ree 7ET$. 3. Count a 7ET for eac/ .iece of &ata re'uire& b( t/e u$er to e$tabli$/ a relation$/i. wit/ anot/er IL= or EI=. In an >, a..lication% an e*.lo(eeQ$ infor*ation i$ *aintaine& on an IL=. T/e e*.lo(ee:$ 8ob na*e i$ inclu&e& a$ .art of t/e e*.lo(eeQ$ infor*ation. T/i$ 7ET i$ counte& becau$e it i$ re'uire& to relate an e*.lo(ee to a 8ob t/at e5i$t$ in t/e organi+ation. T/i$ t(.e of &ata ele*ent i$ referre& to a$ a foreign key. In an ob8ect oriente& HAAJ a..lication% t/e u$er re'uire$ an a$$ociation between ob8ect cla$$e$% w/ic/ /a2e been i&entifie& a$ $e.arate IL=$. Location na*e i$ a 7ET in t/e Location EI=. T/e location na*e i$ re'uire& w/en .roce$$ing e*.lo(ee infor*ationC con$e'uentl(% it i$ al$o counte& a$ a 7ET wit/in t/e E*.lo(ee IL=.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

45

CS605 Software Engineering-II

VU

Lecture No. 11 .unction 1oint Counting 1roce%% 6cont.7


4ET +efinition
9 record element type H,ETJ i$ a u$er recogni+able $ubgrou. of &ata ele*ent$ wit/in an IL= or EI=. T/ere are two t(.e$ of $ubgrou.$6 A.tional #an&ator( Optional subgroups are t/o$e t/at t/e u$er /a$ t/e o.tion of u$ing one or none of t/e $ubgrou.$ &uring an ele*entar( .roce$$ t/at a&&$ or create$ an in$tance of t/e &ata. )andatory subgroups are $ubgrou.$ w/ere t/e u$er *u$t u$e at lea$t one. =or e5a*.le% in a >u*an ,e$ource$ 9..lication% infor*ation for an e*.lo(ee i$ a&&e& b( entering $o*e general infor*ation. In a&&ition to t/e general infor*ation% t/e e*.lo(ee i$ a $alarie& or /ourl( e*.lo(ee. T/e u$er /a$ &eter*ine& t/at an e*.lo(ee *u$t be eit/er $alarie& or /ourl(. Eit/er t(.e can /a2e infor*ation about &e.en&ent$. =or t/i$ e5a*.le% t/ere are t/ree $ubgrou.$ or ,ET$ a$ $/own below6 Salarie& e*.lo(ee H*an&ator(JC inclu&e$ general infor*ation >ourl( e*.lo(ee H*an&ator(JC inclu&e$ general infor*ation 7e.en&ent Ho.tionalJ

4ET 4ule%
One of t/e following rule$ a..lie$ w/en counting ,ET$6 Count a ,ET for eac/ o.tional or *an&ator( $ubgrou. of t/e IL= or EI=. Or If t/ere are no $ubgrou.$% count t/e IL= or EI= a$ one ,ET.

@int% to @el* wit! Counting


T/e following /int$ *a( /el. (ou a..l( t/e IL= an& EI= counting rule$. Caution< T/e$e /int$ are not rule$ an& $/oul& not be u$e& a$ rule$. 1. I$ t/e &ata a logical grou. t/at $u..ort$ $.ecific u$er re'uire*ent$L aJ 9n a..lication can u$e an IL= or EI= in *ulti.le .roce$$e$% but t/e IL= or EI= i$ counte& onl( once. bJ 9 logical file cannot be counte& a$ bot/ an IL= an& EI= for t/e $a*e a..lication. If t/e &ata grou. $ati$fie$ bot/ rule$% count a$ an IL=. cJ If a grou. of &ata wa$ not counte& a$ an IL= or EI= it$elf% count it$ &ata ele*ent$ a$ 7ET$ for t/e IL= or EI=% w/ic/ inclu&e$ t/at grou. of &ata. &J 7o not a$$u*e t/at one ./($ical file% table or ob8ect cla$$ e'ual$ one logical file w/en 2iewing &ata logicall( fro* t/e u$er .er$.ecti2e. eJ 9lt/oug/ $o*e $torage tec/nologie$ $uc/ a$ table$ in a relational 7)#S or $e'uential flat file or ob8ect cla$$e$ relate clo$el( to IL=$ or EI=$% &o not a$$u*e t/at t/i$ alwa($ e'ual$ a one-to-one ./($ical-logical relation$/i.. fJ 7o not a$$u*e all ./($ical file$ *u$t be counte& or inclu&e& a$ .art of an IL= or EI=. 2. ;/ere i$ &ata *aintaine&L In$i&e or out$i&e t/e a..lication boun&ar(L aJ Loo4 at t/e wor4flow. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
46

CS605 Software Engineering-II

VU

bJ In t/e .roce$$ functional &eco*.o$ition% i&entif( w/ere interface$ occur wit/ t/e u$er an& ot/er a..lication$. cJ ;or4 t/roug/ t/e .roce$$ &iagra* to get /int$. &J Cre&it IL=$ *aintaine& b( *ore t/an one a..lication to eac/ a..lication at t/e ti*e t/e a..lication i$ counte&. Anl( t/e 7ET$ being u$e& b( eac/ a..lication being counte& $/oul& be u$e& to $i+e t/e IL=OEI=. 3. I$ t/e &ata in an IL= *aintaine& t/roug/ an ele*entar( .roce$$ of t/e a..licationL aJ 9n a..lication can u$e an IL= or EI= *ulti.le ti*e$% but (ou count t/e IL= or EI= onl( once. bJ 9n ele*entar( .roce$$ can *aintain *ore t/an one IL=. cJ ;or4 t/roug/ t/e .roce$$ &iagra* to get /int$. &J Cre&it IL=$ *aintaine& b( *ore t/an one a..lication to eac/ a..lication at t/e ti*e t/e a..lication i$ counte&.

@int% to @el* wit! Identif2ing IL.%D EI.%D and 4ET%


7ifferentiating ,ET$ fro* IL=$ an& EI=$ i$ one of t/e *o$t acti2itie$ in =3 anal($i$. 7ifferent conce.t$ regar&ing entitie$ .la( a .i2otal role in t/i$ regar&$. Let u$ t/erefore un&er$tan& w/at an entit( i$ an& w/at &ifferent t(.e$ of entitie$ are.

Entit2
9n entit( i$ &efine& b( &ifferent .eo.le a$ follow$6 K K K K K K 9 t/ing t/at can be &i$tinctl( i&entifie&. HC/enJ 9n( &i$tingui$/able ob8ect t/at i$ to be re.re$ente& in t/e &ataba$e. H7ateJ 9n( &i$tingui$/able .er$on% .lace% t/ing% e2ent or conce.t about w/ic/ infor*ation i$ 4e.t. H)ruceJ 9 &ata entit( re.re$ent$ $o*e Yt/ingY t/at i$ to be $tore& for later reference. T/e ter* entit( refer$ to t/e logical re.re$entation of &ata. H=in4el$teinJ 9n entit( *a( al$o re.re$ent t/e relation$/i. between two or *ore entitie$% calle& a%%ociati,e entit2. H,eingruberJ 9n entit( *a( re.re$ent a $ub$et of infor*ation rele2ant to an in$tance of an entit(% calle& %ubt2*e entit2. H,eingruberJ

T/at i$% an entit( i$ a .rinci.al &ata ob8ect about w/ic/ infor*ation i$ collecte& t/at i$ a fun&a*ental t/ing of rele2ance to t/e u$er% about w/ic/ a collection of fact$ i$ 4e.t. 9n entit( can be a wea4 entit( or a $trong entit(. 9 wea4 entit( i$ t/e one w/ic/ &oe$ not /a2e an( role in t/e .roble* &o*ain wit/out $o*e ot/er entit(. ;ea4 entitie$ are ,ET$ an& $trong entitie$ are IL=$ an& EI=$. I&entification of wea4 entitie$ i$ t/erefore i*.ortant for &i$tingui$/ing between ,ET$ an& logical file$.

ea( Entitie%
T/ere are t/ree t(.e$ of wea4 entitie$6 9$$ociati2e entit( t(.e$% attributi2e entit( t(.e% an& entit( $ubt(.e. T/e$e are elaborate& a$ follow$6 K #%%ociati,e Entit2 T2*e F 9n entit( w/ic/ &efine$ *an(-to-*an( relation$/i. between two or *ore entitie$. F Stu&ent F cour$e F 3art F &ealer
47

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II K

VU

#ttributi,e Entit2 T2*e E 9n entit( t(.e w/ic/ furt/er &e$cribe$ one or *ore c/aracteri$tic$ of anot/er entit(. F 3ro&uct F 3art F 3ro&uct F 3ro&uct 3rice Infor*ation Entit2 Subt2*e F 9 $ub&i2i$ion of entit(. 9 $ubt(.e in/erit$ all t/e attribute$ of it$ .arent entit( t(.e% an& *a( /a2e a&&itional% uni'ue attribute$. F E'*lo2ee 1er'anent E'*lo2ee Contract E'*lo2ee F E'*lo2ee -arried E'*lo2ee Single E'*lo2ee

Logical .ile%
Grou.ing of &ata into logical file$ i$ t/e re$ult of co*bine& effect of two grou.ing *et/o&$6 K >ow &ata i$ acce$$e& a$ a grou. b( ele*entar( .roce$$e$L H.roce$$ &ri2enJ K T/e relation$/i. between t/e entitie$ an& t/eir inter&e.en&enc( ba$e& on bu$ine$$ rule$. H&ata &ri2enJ T/e following gui&eline can be u$e& for t/i$ .ur.o$e6 K 3roce$$ 7ri2en 9..roac/ K 7ata 7ri2en 9..roac/

1roce%% +ri,en #**roac!


If $e2eral entitie$ are alwa($ created toget/er an& deleted toget/er t/en t/i$ i$ a $trong in&ication t/at t/e( $/oul& be grou.e& into a $ingle logical file. K K K 9 cu$to*er 3A i$ a $ingle grou. of &ata fro* a u$er bu$ine$$ .er$.ecti2e. It con$i$t$ of a /ea&er an& ite*$ infor*ation. =ro* a bu$ine$$ .er$.ecti2e% an or&er cannot be create& unle$$ it /a$ at lea$t one ite* an& if t/e or&er i$ &elete& bot/ t/e or&er /ea&er an& ite*$ are &elete&. >owe2er t/e /ea&er an& t/e ite*$ *a( /a2e in&e.en&ent *aintenance tran$action$.

+ata +ri,en #**roac!


Entit2 Inde*endence< an entit( /a$ $ignificance to t/e bu$ine$$ in an& of it$elf wit/out t/e .re$ence of ot/er entitie$. T/i$ i$ a logical file. Entit2 +e*endence< an entit( i$ not *eaningful% /a$ no $ignificance to t/e bu$ine$$ in an& of it$elf wit!out t/e .re$ence of ot/er entitie$. T/i$ i$ an ,ET. K Gi2en two lin4e& entitie$ 9 an& )% w/et/er ) i$ &e.en&ent or in&e.en&ent6 F I$ ) $ignificant to t/e bu$ine$$ a.art fro* t/e occurrence of 9 lin4e& to itL F If we &elete an occurrence YaY of 9% w/at /a..en$ to occurrence YbY of ) lin4e& to YaYL

=or e5a*.le in t/e following $cenario$% t/e fir$t one i$ t/e e5a*.le of entit( &e.en&ence w/ile t/e $econ& one i$ t/e e5a*.le of entit( in&e.en&ence. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
48

CS605 Software Engineering-II

VU

F E*.lo(ee F C/il& F E*.lo(ee - Co*.an( 9&o.te& C/il& T/e$e conce.t$ are $u**ari+e& in t/e following table6
EC4 Conce*t 3rinci.al &ata ob8ect$ about w/ic/ infor*ation i$ collecte& 9n entit( t(.e w/ic/ contain$ attribute$ w/ic/ furt/er &e$cribe relation$/i.$ between ot/er entitie$ 9n entit( t(.e t/at furt/er &e$cribe$ one or *ore c/aracteri$tic$ of anot/er entit( t(.e 9 &i2i$ion of an entit( t(.e% w/ic/ in/erit$ all t/e attribute$ an& relation$/i.$ of it$ .arent entit( t(.eC *a( /a2e a&&itional% uni'ue attribute$ an& relation$/i.$ EC4 Ter' Entit( or Entit( T(.e 9$$ociati2e entit( t(.e 9ttributi2e entit( t(.e Entit( $ubt(.e .1# Ter' IL= or EI= I.1UF C1- 5.1 +efinition =ile refer$ to a logicall( relate& grou. of &ata an& not t/e ./($ical i*.le*entation of t/o$e grou.$ of &ata. 1$er recogni+able $ubgrou. of &ata ele*ent$ wit/in an IL= or EI= 1$er recogni+able $ubgrou. of &ata ele*ent$ wit/in an IL= or EI= 1$er recogni+able $ubgrou. of &ata ele*ent$ wit/in an IL= or EI=

A.tional or *an&ator( $ubgrou. A.tional or *an&ator( $ubgrou. A.tional or *an&ator( $ubgrou.

+efinition%< EI%D E/% and E;%


T/i$ $ection inclu&e$ t/e &efinition$ of EI$% EA$ an& E@$. E*be&&e& ter*$ wit/in t/e &efinition$ are &efine&% an& e5a*.le$ are inclu&e& t/roug/out t/i$ &efinition $ection.

E)ternal In*ut%
9n e5ternal in.ut HEIJ i$ an ele*entar( .roce$$ t/at .roce$$e$ &ata or control infor*ation t/at co*e$ fro* out$i&e t/e a..lication boun&ar(. T/e .ri*ar( intent of an EI i$ to *aintain one or *ore IL=$ an&Oor to alter t/e be/a2ior of t/e $($te*.

E)ternal /ut*ut%
9n e5ternal out.ut HEAJ i$ an ele*entar( .roce$$ t/at $en&$ &ata or control infor*ation out$i&e t/e a..lication boun&ar(. T/e .ri*ar( intent of an e5ternal out.ut i$ to .re$ent infor*ation to a u$er t/roug/ .roce$$ing logic ot/er t/an% or in a&&ition to% t/e retrie2al of &ata or control infor*ation . T/e .roce$$ing logic *u$t contain at lea$t one *at/e*atical for*ula or calculation% or create &eri2e& &ata. 9n e5ternal out.ut *a( al$o *aintain one or *ore IL=$ an&Oor alter t/e be/a2ior of t/e $($te*.

E)ternal In&uir2
9n e5ternal in'uir( HE@J i$ an ele*entar( .roce$$ t/at $en&$ &ata or control infor*ation out$i&e t/e a..lication boun&ar(. T/e .ri*ar( intent of an e5ternal in'uir( i$ to .re$ent infor*ation to a u$er t/roug/ t/e retrie2al of &ata or control infor*ation fro* an IL= or EI=. T/e .roce$$ing logic contain$ no *at/e*atical for*ula$ or calculation$% an& create$ no &eri2e& &ata. No IL= i$ *aintaine& &uring t/e .roce$$ing% nor i$ t/e be/a2ior of t/e $($te* altere&.

Su''ar2 of t!e .unction% 1erfor'ed b2 EI%D E/%D and E;%


T/e *ain &ifference between t/e tran$actional function t(.e$ i$ t/eir .ri*ar( intent. T/e table below $u**ari+e$ function$ t/at *a( be .erfor*e& b( eac/ tran$actional function t(.e% an& $.ecifie$ t/e .ri*ar( intent of eac/. Note t/e .ri*ar( intent for an EINt/i$ i$ - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

49

CS605 Software Engineering-II

VU

t/e *ain &ifference fro* EA$ an& E@$. So*e of t/e &ifference$ between EA$ an& E@$ are t/at an EA *a( .erfor* t/e function$ of altering t/e be/a2ior of t/e $($te* or *aintaining one or *ore IL=$ w/en .erfor*ing t/e .ri*ar( intent of .re$enting infor*ation to t/e u$er. At/er &ifference$ are i&entifie& in t/e $ection below t/at $u**ari+e$ for*$ of .roce$$ing logic u$e& b( eac/ tran$actional function. =unction 9lter t/e be/a2ior of t/e $($te* #aintain one or *ore IL=$ 3re$ent infor*ation to a u$er Tran$actional =unction T(.e EI EA E@ 3I = NO9 3I = NO9 = 3I 3I

Legen&6 3I T/e .ri*ar( intent of t/e tran$actional function t(.e = 9 function of t/e tran$actional function t(.e% but i$ not t/e .ri*ar( intent an& i$ $o*eti*e$ .re$ent NO9 T/e function i$ not allowe& b( t/e tran$actional function t(.e.

1roce%%ing Logic
1. 2. *rocessing logic i$ &efine& a$ re'uire*ent$ $.ecificall( re'ue$te& b( t/e u$er to co*.lete an ele*entar( .roce$$. T/o$e re'uire*ent$ *a( inclu&e t/e following action$6 0ali&ation$ are .erfor*e&. =or e5a*.le% w/en a&&ing a new e*.lo(ee to an organi+ation% t/e e*.lo(ee .roce$$ /a$ .roce$$ing logic t/at 2ali&ate$ t/e infor*ation being a&&e&. #at/e*atical for*ula$ an& calculation$ are .erfor*e&. =or e5a*.le% w/en re.orting on all e*.lo(ee$ wit/in an organi+ation t/e .roce$$ inclu&e$ calculating t/e total nu*ber of $alarie& e*.lo(ee$% /ourl( e*.lo(ee$ an& all e*.lo(ee$. E'ui2alent 2alue$ are con2erte& =or e5a*.le% an ele*entar( .roce$$ reference$ currenc( con2er$ion rate$ fro* 1S &ollar$ to ot/er currencie$. T/e con2er$ion i$ acco*.li$/e& b( retrie2ing 2alue$ fro* table$% $o calculation$ nee& not be .erfor*e&. 7ata i$ filtere& an& $electe& b( u$ing $.ecifie& criteria to co*.are *ulti.le $et$ of &ata. =or e5a*.le% to generate a li$t of e*.lo(ee$ b( a$$ign*ent% an ele*entar( .roce$$ co*.are$ t/e 8ob nu*ber of a 8ob a$$ign*ent to $elect an& li$t$ t/e a..ro.riate e*.lo(ee$ wit/ t/at a$$ign*ent. Con&ition$ are anal(+e& to &eter*ine w/ic/ are a..licable. =or e5a*.le% .roce$$ing logic e5erci$e& b( t/e ele*entar( .roce$$ w/en an e*.lo(ee i$ a&&e& an& will &e.en& on w/et/er an e*.lo(ee i$ .ai& ba$e& on $alar( or /our$ wor4e&. Ane or *ore IL=$ are u.&ate&. =or e5a*.le% w/en a&&ing an e*.lo(ee% t/e ele*entar( .roce$$ u.&ate$ t/e e*.lo(ee IL= to *aintain t/e e*.lo(ee &ata. Ane or *ore IL=$ or EI=$ are reference&. =or e5a*.le% w/en a&&ing an e*.lo(ee% t/e currenc( EI= i$ reference& to u$e t/e correct 1S &ollar con2er$ion rate to &eter*ine an e*.lo(ee:$ /ourl( rate. 7ata or control infor*ation i$ retrie2e&. aJ =or e5a*.le% to 2iew a li$t of .o$$ible .a( gra&e$% .a( gra&e infor*ation i$ retrie2e&. 7eri2e& &ata i$ create& b( tran$for*ing e5i$ting &ata to create a&&itional &ata.

3.

4.

5. 6. !. . ".

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

50

CS605 Software Engineering-II

VU

=or e5a*.le% to &eter*ine H&eri2eJ a .atient:$ regi$tration nu*ber He.g.% S#I?A01J% t/e following &ata i$ concatenate&6 aJ t/e fir$t t/ree letter$ of t/e .atient:$ la$t na*e He.g.% S#I for S*it/J bJ t/e fir$t two letter of t/e .atient:$ fir$t na*e He.g.% ?A for ?o/nJ cJ a uni'ue two-&igit $e'uence nu*ber H$tarting wit/ 01J 10. )e/a2ior of t/e $($te* i$ altere&. =or e5a*.le% t/e be/a2ior of t/e ele*entar( .roce$$ of .a(ing e*.lo(ee$ i$ altere& w/en a c/ange i$ *a&e to .a( t/e* e2er( ot/er =ri&a( 2er$u$ on t/e 15t/ an& t/e la$t &a( of t/e *ont/. 11. 3re.are an& .re$ent infor*ation out$i&e t/e boun&ar(. =or e5a*.le% a li$t of e*.lo(ee$ &i$.la(e& for t/e u$er. 12. Ca.abilit( e5i$t$ to acce.t &ata or control infor*ation t/at enter$ t/e a..lication boun&ar(. =or e5a*.le% a u$er enter$ $e2eral .iece$ of infor*ation to a&& a cu$to*er or&er to t/e $($te*. 13. 7ata i$ re$orte& or rearrange&. =or e5a*.le% a u$er re'ue$t$ t/e li$t of e*.lo(ee$ in al./abetical or&er. Note< ,e$orting or rearranging a $et of &ata &oe$ not i*.act t/e i&entification of t/e t(.e or uni'uene$$ of a tran$actional function.

Su''ar2 of 1roce%%ing Logic U%ed b2 EI%D E/% and E;%


T/e following table $u**ari+e$ w/ic/ for*$ of g logic *a( be .erfor*e& b( EI$% Eo$% an& E@$. =oe eac/ tran$actional function t(.e% certain t(.e$ of .roce$$ing logic *u$t be .erfor*e& to acco*.li$/ t/e .ri*ar( intent of t/at t(.e. =or* of 3roce$$ing Logic 1. 0ali&ation$ are .erfor*e& 2. #at/e*atical =or*ula an& calculation$ are .erfor*e& 3. E'ui2alent 0alue$ are con2erte& 4. 7ata i$ filtere& an& $electe& b( u$ing $.ecifie& criteria to co*.are *ulti.le $et$ of &ata. 5. Con&ition$ are anal(+e& to &eter*ine w/ic/ are a..licable 6. 9t lea$t one IL= i$ u.&ate& !. 9t lea$t one IL= or EI= i$ reference& . 7ata or control infor*ation i$ retrie2e& ". 7eri2e& &ata i$ create& 10. )e/a2ior of $($te* i$ altere& 11. 3re.are an& .re$ent infor*ation out$i&e t/e boun&ar( 12. Ca.abilit( to acce.t &ata or control infor*ation t/at enter$ t/e a..lication boun&ar( 13. ,e$orting or rearranging a $et of &ata Legen& Tran$actional =unctional T(.e EI E/ E; c c c c *T n c c c *T c c c *T c *T c c c c *T c c *T *T * c c c c c n * * n n * c c

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

51

CS605 Software Engineering-II * *T c n

VU

it i$ 'andator2 t/at t/e function t(.e .erfor* t/e for* of .roce$$ing logic. it i$ 'andator2 t/at t/e function t(.e .erfor* at lea$t on of t/e$e H*TJ for*$ of .roce$$ing logic t/e function t(.e can .erfor* t/e for* of .roce$$ing logic% but it i$ not *an&ator(. function t(.e cannot .erfor* t/e for* of .roce$$ing logic

EICE/CE; Counting 4ule%


T/i$ $ection &efine$ t/e rule$ t/at a..l( w/en counting EI$% EA$ an& E@$.

Ele'entar2 1roce%% Identification 4ule%


To i&entif( ele*entar( .roce$$e$% loo4 for u$er acti2itie$ occurring in t/e a..lication. 9ll of t/e following counting rule$ *u$t a..l( for t/e .roce$$ to be i&entifie& a$ an ele*entar( .roce$$. T/e .roce$$ i$ t/e $*alle$t unit of acti2it( t/at i$ *eaningful to t/e u$er. T/e .roce$$ i$ $elf-containe& an& lea2e$ t/e bu$ine$$ of t/e a..lication in a con$i$tent $tate.

Tran%actional .unction% Counting 4ule%


To cla$$if( eac/ ele*entar( .roce$$% &eter*ine w/ic/ of t/e .ri*ar( intent &e$cri.tion$ a..l(% an& u$e t/e a$$ociate& rule$ to i&entif( a $.ecific tran$actional function t(.e.

1ri'ar2 Intent +e%cri*tion for EI%


T/e .ri*ar( intent of an ele*entar( .roce$$ i$ to *aintain an IL= or alter t/e be/a2ior of t/e $($te*.

E)ternal In*ut Counting 4ule%


=or eac/ ele*entar( .roce$$ t/at /a$ a .ri*ar( intent to *aintain one or *ore IL=$ or to alter t/e be/a2ior of t/e $($te*% a..l( t/e following rule$ to &eter*ine if t/e function $/oul& be cla$$ifie& a$ an e5ternal in.ut. 9ll of t/e rule$ *u$t a..l( for t/e ele*entar( .roce$$ to be counte& a$ a uni'ue occurrence of an e5ternal in.ut. T/e &ata or control infor*ation i$ recei2e& fro* out$i&e t/e a..lication boun&ar(. 9t lea$t one IL= i$ *aintaine& if t/e &ata entering t/e boun&ar( i$ not control infor*ation t/at alter$ t/e be/a2ior of t/e $($te*. =or t/e i&entifie& .roce$$% one of t/e following t/ree $tate*ent$ *u$t a..l(6 o 3roce$$ing logic i$ uni'ue fro* t/e .roce$$ing logic .erfor*e& b( ot/er e5ternal in.ut$ for t/e a..lication. o T/e $et of &ata ele*ent$ i&entifie& i$ &ifferent fro* t/e $et$ i&entifie& for ot/er e5ternal in.ut$ for t/e a..lication. o T/e IL=$ or EI=$ reference& are &ifferent fro* t/e file$ reference& b( ot/er e5ternal in.ut$ in t/e a..lication.

1ri'ar2 Intent +e%cri*tion for E/% and E&%

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

52

CS605 Software Engineering-II

VU

T/e .ri*ar( intent of t/e ele*entar( .roce$$ i$ to .re$ent infor*ation to a u$er.

S!ared E/ and E; Counting 4ule%


=or eac/ ele*entar( .roce$$ t/at /a$ a .ri*ar( intent to .re$ent infor*ation to a u$er% a..l( t/e following rule$ to &eter*ine if t/e .roce$$ *a( be cla$$ifie& a$ an e5ternal out.ut or e5ternal in'uir(. 9ll of t/e rule$ *u$t a..l( for t/e ele*entar( .roce$$ to be counte& a$ a uni'ue occurrence of an e5ternal out.ut or e5ternal in'uir(. T/e function $en&$ &ata or control infor*ation e5ternal to t/e a..lication boun&ar(. =or t/e i&entifie& .roce$$% one of t/e following t/ree $tate*ent$ *u$t a..l(6 o 3roce$$ing logic i$ uni'ue fro* t/e .roce$$ing logic .erfor*e& b( ot/er e5ternal out.ut$ or e5ternal in'uirie$ for t/e a..lication. o T/e $et of &ata ele*ent$ i&entifie& i$ &ifferent fro* t/e $et$ i&entifie& for ot/er e5ternal out.ut$ an& e5ternal in'uirie$ in t/e a..lication. o T/e IL=$ or EI=$ reference& are &ifferent fro* t/e file$ reference& b( ot/er e5ternal out.ut$ an& e5ternal in'uirie$ in t/e a..lication.

#dditional E)ternal /ut*ut Counting 4ule%


In a&&ition to a&/ering to all $/are& EA an& E@ rule$% one of t/e following rule$ *u$t a..l( for t/e ele*entar( .roce$$ to be counte& a$ a uni'ue e5ternal out.ut. T/e .roce$$ing logic of t/e ele*entar( .roce$$ contain$ at lea$t one *at/e*atical for*ula or calculation. T/e .roce$$ing logic of t/e ele*entar( .roce$$ create$ &eri2e& &ata. T/e .roce$$ing logic of t/e ele*entar( .roce$$ *aintain$ at lea$t one IL=. T/e .roce$$ing logic of t/e ele*entar( .roce$$ alter$ t/e be/a2ior of t/e $($te*.

#dditional E)ternal In&uir2 Counting 4ule%


In a&&ition to a&/ering to all $/are& EA an& E@ rule$% all of t/e following rule$ *u$t a..l( for t/e ele*entar( .roce$$ to be counte& a$ a uni'ue e5ternal in'uir(. T/e .roce$$ing logic of t/e ele*entar( .roce$$ retrie2e$ &ata or control infor*ation fro* an IL= or EI=. T/e .roce$$ing logic of t/e ele*entar( .roce$$ &oe$ not contain a *at/e*atical for*ula or calculation. T/e .roce$$ing logic of t/e ele*entar( .roce$$ &oe$ not create &eri2e& &ata. T/e .roce$$ing logic of t/e ele*entar( .roce$$ &oe$ not *aintain an IL=. T/e .roce$$ing logic of t/e ele*entar( .roce$$ &oe$ not alter t/e be/a2ior of t/e $($te*.

Co'*le)it2 and Contribution +efinition% and 4ule%


T/e nu*ber of EI$% EA$% an& E@$ an& t/eir relati2e functional co*.le5itie$ &eter*ine t/e contribution of t/e tran$actional function$ to t/e una&8u$te& function .oint count. 9$$ign eac/ i&entifie& EI% EA an& E@ a functional co*.le5it( ba$e& on t/e nu*ber of file t(.e$ reference& H=T,$J an& &ata ele*ent t(.e$ H7ET$J. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
53

CS605 Software Engineering-II

VU

.T4 +efinition
9 file type referenced i$ VW9n internal logical file rea& or *aintaine& b( a tran$actional function or VW9n e5ternal interface file rea& b( a tran$actional function

+ET +efinition
9 data element type i$ a uni'ue u$er recogni+able% non-re.eate& fiel&.

EI Co'*le)it2 and Contribution 4ule%


T/i$ $ection &efine$ =T, an& 7ET rule$ u$e& to &eter*ine t/e co*.le5it( an& contribution of e5ternal in.ut$.

.T4 4ule% for an EI


T/e following rule$ a..l( w/en counting =T,$6 Count an =T, for eac/ IL= *aintaine&. Count an =T, for eac/ IL= or EI= rea& &uring t/e .roce$$ing of t/e e5ternal in.ut. Count onl( one =T, for eac/ IL= t/at i$ bot/ *aintaine& an& rea&.

+ET 4ule% for an EI


T/e following rule$ a..l( w/en counting 7ET$6 Count one 7ET for eac/ u$er recogni+able% non-re.eate& fiel& t/at enter$ or e5it$ t/e a..lication boun&ar( an& i$ re'uire& to co*.lete t/e e5ternal in.ut. =or e5a*.le% 8ob na*e an& .a( gra&e are two fiel&$ t/at t/e u$er .ro2i&e$ w/en a&&ing a 8ob. 7o not count fiel&$ t/at are retrie2e& or &eri2e& b( t/e $($te* an& $tore& on an IL= &uring t/e ele*entar( .roce$$ if t/e fiel&$ &i& not cro$$ t/e a..lication boun&ar(.
=or e5a*.le% w/en t/e cu$to*er or&er i$ a&&e& to t/e $($te*% t/e unit .rice i$ auto*aticall( retrie2e& for eac/ or&ere& ite* an& $tore& on t/e billing recor&. T/e unit .rice woul& not be counte& a$ a 7ET for t/e EI becau$e it &i& not cro$$ t/e boun&ar( w/en t/e u$er a&&$ t/e cu$to*er or&er.

=or e5a*.le% in or&er to *aintain t/e 1S /ourl( rate for /ourl( e*.lo(ee$ wor4ing in ot/er countrie$ wit/ ot/er currencie$% t/e local /ourl( rate i$ .ro2i&e& b( t/e u$er. 7uring t/e .roce$$ing of all t/e .iece$ of &ata .ro2i&e& to a&& an e*.lo(ee% a con2er$ion rate i$ retrie2e& fro* t/e currenc( $($te* to calculate t/e 1S /ourl( rate. T/e calculate& 1S /ourl( rate i$ *aintaine& on t/e e*.lo(ee IL= a$ a re$ult of a&&ing t/e e*.lo(ee. T/e 1S /ourl( rate woul& not be counte& a$ a 7ET for t/e EI becau$e it &oe$ not enter t/e boun&ar(% but i$ internall( calculate& Hi.e.% it i$ &eri2e& &ataJ. Count one 7ET for t/e ca.abilit( to $en& a $($te* re$.on$e *e$$age out$i&e t/e a..lication boun&ar( to in&icate an error occurre& &uring .roce$$ing% confir* t/at .roce$$ing i$ co*.lete or 2erif( t/at .roce$$ing $/oul& continue.
54

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

=or e5a*.le% if a u$er trie$ to a&& an e5i$ting e*.lo(ee to a >u*an ,e$ource$ a..lication% t/e $($te* generate$ one of $e2eral error *e$$age$ an& t/e incorrect fiel& i$ /ig/lig/te&. Count one 7ET t/at inclu&e$ all t/e $($te* re$.on$e$ w/ic/ in&icate t/e error con&ition$% confir* t/at .roce$$ing i$ co*.lete or 2erif( t/at .roce$$ing $/oul& continue. Count one 7ET for t/e abilit( to $.ecif( an action to be ta4en e2en if t/ere are *ulti.le *et/o&$ for in2o4ing t/e $a*e logical .roce$$.

=or e5a*.le% if t/e u$er can initiate t/e a&&ing of an e*.lo(ee clic4ing on t/e AI button or b( .re$$ing a 3= 4e(% count one 7ET for t/e abilit( to initiate t/e .roce$$.

E/CE; Co'*le)it2 and Contribution 4ule%


T/i$ $ection &efine$ =T, an& 7ET rule$ u$e& to &eter*ine t/e co*.le5it( an& contribution of e5ternal out.ut$ an& e5ternal in'uirie$.

S!ared .T4 4ule% for E/% and E;%


T/e following rule a..lie$ w/en counting =T,$ for bot/ EA$ an& E@$6 Count one =T, for eac/ IL= or EI= rea& &uring t/e .roce$$ing of t/e ele*entar( .roce$$.

#dditional .T4 4ule% for an E/


T/e following a&&itional rule$ a..l( w/en counting =T,$ for EA$6 Count one =T, for eac/ IL= *aintaine& &uring t/e .roce$$ing of t/e ele*entar( .roce$$. Count onl( one =T, for eac/ IL= t/at i$ bot/ *aintaine& an& rea& &uring t/e ele*entar( .roce$$.

S!ared +ET 4ule% for E/% and E;%


T/e following rule$ a..l( w/en counting 7ET$ for bot/ EA$ an& E@$. Count one 7ET for eac/ u$er recogni+able% non-re.eate& fiel& t/at enter$ t/e a..lication boun&ar( an& i$ re'uire& to $.ecif( w/en% w/at an&Oor /ow t/e &ata i$ to be retrie2e& or generate& b( t/e ele*entar( .roce$$. =or e5a*.le HEAOE@J% to generate a li$t of e*.lo(ee$% e*.lo(ee na*e i$ a fiel& t/e u$er .ro2i&e$ w/en in&icating w/ic/ e*.lo(ee$ to li$t. Count one 7ET for eac/ u$er recogni+able% non-re.eate& fiel& t/at e5it$ t/e boun&ar(. =or e5a*.le HEAOE@J% a te5t *e$$age *a( be a $ingle wor&% $entence% or ./ra$eNa line or .aragra./ inclu&e& on a re.ort to in&icate an e5.lanator( co**ent count$ a$ a $ingle 7ET. =or e5a*.le HEAOE@J% an account nu*ber or &ate ./($icall( $tore& in *ulti.le fiel&$ i$ counte& a$ one 7ET w/en it i$ re'uire& a$ a $ingle .iece of infor*ation.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

55

CS605 Software Engineering-II

VU

=or e5a*.le HEAOE@J% a .ie c/art *ig/t /a2e a categor( label an& a nu*erical e'ui2alent in a gra./ical out.ut. Count two 7ET$ None for &e$ignating t/e categor( an& one for t/e nu*erical 2alue. If a 7ET bot/ enter$ an& e5it$ t/e boun&ar(% count it onl( once for t/e ele*entar( .roce$$. Count one 7ET for t/e ca.abilit( to $en& a $($te* re$.on$e *e$$age out$i&e t/e a..lication boun&ar( to in&icate an error occurre& &uring .roce$$ing% confir* t/at .roce$$ing i$ co*.lete or 2erif( t/at .roce$$ing $/oul& continue.

=or e5a*.le HEAOE@J% if a u$er trie$ to re'ue$t a li$ting% but &oe$ not /a2e acce$$ to t/e infor*ation% count one 7ET for t/e $($te* re$.on$e. Count one 7ET for t/e abilit( to $.ecif( an action to be ta4en e2en if t/ere are *ulti.le *et/o&$ for in2o4ing t/e $a*e logical .roce$$.

=or e5a*.le HEAOE@J% if t/e u$er can initiate t/e generation of a re.ort b( clic4ing on t/e AI button or b( .re$$ing a 3= 4e(% count one 7ET for t/e abilit( to initiate t/e re.ort. 7o not count fiel&$ t/at are retrie2e& or &eri2e& b( t/e $($te* an& $tore& on an IL= &uring t/e ele*entar( .roce$$ if t/e fiel&$ &i& not cro$$ t/e a..lication boun&ar(. =or e5a*.le HEAJ% w/en a .a(c/ec4 i$ .rinte&% a $tatu$ fiel& on t/e e*.lo(ee IL= i$ u.&ate& to in&icate t/at t/e c/ec4 /a$ been .rinte&. 7o not count t/e $tatu$ fiel& a$ a 7ET $ince it &i& not cro$$ t/e boun&ar(. 7o not count literal$ a$ 7ET$.

=or e5a*.le HEAOE@J% literal$ inclu&e re.ort title$% $creen or .anel i&entification% colu*n /ea&ing$% an& fiel& title$. 7o not count .aging 2ariable$ or $($te*-generate& $ta*.$. =or e5a*.le HEAOE@J% $($te*-generate& 2ariable$ an& $ta*.$ inclu&e 3age nu*ber$ 3o$itioning infor*ation $uc/ a$ Y,ow$ 3! to 54 of 211Y 3aging co**an&$ $uc/ a$ .re2iou$% ne5t% an& .aging arrow$ on a G1I a..lication 7ate an& ti*e fiel&$ if t/e( are &i$.la(e&.

Hints to Help with Counting EIs, EOs and EQs


T/e following /int$ *a( /el. (ou a..l( t/e EI% EA an& E@ counting rule$. Caution< T/e /int$ are not rule$ an& $/oul& not be u$e& a$ rule$. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
56

CS605 Software Engineering-II

VU

I$ &ata recei2e& fro* out$i&e t/e a..lication boun&ar(L o Loo4 at t/e wor4 flow. o I&entif( w/ere t/e u$er an& ot/er a..lication interface$ occur in t/e .roce$$ functional &eco*.o$ition. I$ t/e .roce$$ t/e $*alle$t unit of acti2it( fro* t/e u$er .er$.ecti2eL o Loo4 at t/e &ifferent .a.er or on-line for*$ u$e&. o ,e2iew t/e IL=$ to i&entif( /ow t/e u$er grou.$ t/e infor*ation. o I&entif( w/ere t/e u$er an& ot/er a..lication interface$ occur in t/e .roce$$ functional &eco*.o$ition. o Loo4 at w/at /a..ene& in t/e *anual $($te*. o Note t/at one ./($ical in.ut or tran$action file or $creen can% w/en 2iewe& logicall(% corre$.on& to a nu*ber of EI$% EA$ or E@$. o Note t/at two or *ore ./($ical in.ut or tran$action file$ or $creen$ can corre$.on& to one EI% EA or E@ if t/e .roce$$ing logic i$ i&entical. I$ t/e .roce$$ $elf-containe& an& &oe$ it lea2e t/e bu$ine$$ in a con$i$tent $tateL o ,e2iew ot/er e5ternal in.ut$% e5ternal out.ut$ an& e5ternal in'uirie$ to un&er$tan& /ow t/e u$er wor4$ wit/ t/e infor*ation. o ;or4 t/roug/ t/e .roce$$ &iagra* to get /int$. o Loo4 at w/at /a..ene& in t/e *anual $($te*. o C/ec4 for con$i$tenc( wit/ ot/er &eci$ion$. I$ t/e .roce$$ing logic uni'ue fro* ot/er EI$% EA$ an& E@$L o I&entif( batc/ in.ut$ or out.ut$ ba$e& on t/e .roce$$ing logic re'uire&. o ,e*e*ber t/at $orting or rearranging a $et of &ata &oe$ not *a4e .roce$$ing logic uni'ue. 9re t/e &ata ele*ent$ &ifferent fro* t/o$e for ot/er EI$% EA$ or E@$L o If t/e &ata ele*ent$ a..ear to be a $ub$et of t/e &ata ele*ent$ of anot/er EI% EA% or E@% be $ure two ele*entar( .roce$$e$ are re'uire& b( t/e u$er F one for t/e *ain &ata ele*ent$ an& one for t/e $ub$et$. I&entif( t/e .ri*ar( intent of t/e ele*entar( .roce$$ before cla$$if(ing it a$ an EI% EA% or E@. I&entification of t/e ele*entar( .roce$$He$J i$ ba$e& on a 8oint un&er$tan&ing or inter.retation of t/e re'uire*ent$ between t/e u$er an& t/e &e2elo.er$. Eac/ ele*ent in a functional &eco*.o$ition *a( not *a. to a uni'ue ele*entar( .roce$$. T/e i&entification of t/e ele*entar( .roce$$e$ re'uire$ inter.retation of t/e u$er re'uire*ent$. Count onl( one =T, for eac/ IL=OEI= reference& e2en if t/e IL=OEI= /a$ *ulti.le ,ET$.

Additional Hints to Help Counting EOs and EQs


I$ t/e .roce$$ t/e $*alle$t unit of acti2it( fro* t/e u$er .er$.ecti2eL
o 9n EA or E@ can be triggere& b( a .roce$$ in$i&e t/e a..lication boun&ar(. =or e5a*.le% t/e u$er re'uire$ t/at a re.ort of all c/ange& e*.lo(ee .a( rate$ be $ent to t/e bu&geting area e2er( /our$ ba$e& on an internal cloc4. Situation 9. T/e re.ort contain$ e*.lo(ee na*e% SSN% an& /ourl( .a( rate w/ic/ are all retrie2e& fro* t/e e*.lo(ee file. T/i$ i$ t/e $*alle$t unit of acti2it( fro* t/e u$er:$ .er$.ecti2e% contain$ no *at/e*atical for*ula$ or calculation$% an& no IL= i$ *aintaine& in t/e .roce$$. T/i$ i$ one E@. Situation ). T/e re.ort contain$ e*.lo(ee na*e% SSN% an&

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

57

CS605 Software Engineering-II

VU

/ourl( .a( rate w/ic/ are all retrie2e& fro* t/e e*.lo(ee file. T/e re.ort al$o inclu&e$ t/e .ercentage .a( c/ange for t/e e*.lo(ee w/ic/ i$ calculate& fro* t/e &ata on t/e e*.lo(ee file. T/i$ i$ t/e $*alle$t unit of acti2it( fro* t/e u$er:$ .er$.ecti2e% an& no IL= i$ *aintaine& in t/e .roce$$. >owe2er% $ince t/e .roce$$ contain$ a *at/e*atical for*ula% t/i$ i$ one EA. 7eri2e& &ata for an EA &oe$ not /a2e to be &i$.la(e& on t/e out.ut. =or e5a*.le% eac/ *ont/% a re.ort i$ generate& li$ting all e*.lo(ee$ &ue for a..rai$al in t/e ne5t 30 &a($. T/e recor&$ are $electe& b( calculating ne5t a..rai$al &ate ba$e& on t/e e*.lo(ee:$ la$t a..rai$al &ate% w/ic/ i$ a fiel& on t/e e*.lo(ee file% an& t/e current &ate .lu$ 30 &a($. T/i$ woul& be counte& a$ one EA% an& not a$ an E@.

General System Characteristics


T/e 1na&8u$te& =unction 3oint count i$ *ulti.lie& b( an a&8u$t*ent factor calle& t/e 0alue 9&8u$t*ent =actor H09=J. T/i$ factor con$i&er$ t/e $($te*Q$ tec/nical an& o.erational c/aracteri$tic$ an& i$ calculate& b( an$wering 14 'ue$tion$. T/e factor$ are6

1. +#T# C/--UNIC#TI/NS
T/e data an& control infor*ation u$e& in t/e a..lication are $ent or recei2e& o2er co**unication facilitie$. Ter*inal$ connecte& locall( to t/e control unit are con$i&ere& to u$e co**unication facilitie$. 3rotocol i$ a $et of con2ention$ w/ic/ .er*it t/e tran$fer or e5c/ange of infor*ation between two $($te*$ or &e2ice$. 9ll &ata co**unication lin4$ re'uire $o*e t(.e of .rotocol. Score #%<

0 1 2 3 4 5

9..lication i$ .ure batc/ .roce$$ing or a $tan&alone 3C. 9..lication i$ batc/ but /a$ re*ote &ata entr( or re*ote .rinting. 9..lication i$ batc/ but /a$ re*ote &ata entr( and re*ote .rinting. 9..lication inclu&e$ online &ata collection or T3 Htele.roce$$ingJ front en& to a batc/ .roce$$ or 'uer( $($te*. 9..lication i$ *ore t/an a front-en&% but $u..ort$ onl( one t(.e of T3 co**unication$ .rotocol. 9..lication i$ *ore t/an a front-en&% an& $u..ort$ *ore t/an one t(.e of T3 co**unication$ .rotocol.

0. +IST4I"UTE+ +#T# 14/CESSINF


7i$tribute& &ata or .roce$$ing function$ are a c/aracteri$tic of t/e a..lication wit/in t/e a..lication boun&ar(. Score #%<

0 1 2 3 4 5

9..lication &oe$ not ai& t/e tran$fer of &ata or .roce$$ing function between co*.onent$ of t/e $($te*. 9..lication .re.are$ &ata for en& u$er .roce$$ing on anot/er co*.onent of t/e $($te* $uc/ a$ 3C $.rea&$/eet$ an& 3C 7)#S. 7ata i$ .re.are& for tran$fer% t/en i$ tran$ferre& an& .roce$$e& on anot/er co*.onent of t/e $($te* Hnot for en&-u$er .roce$$ingJ. 7i$tribute& .roce$$ing an& &ata tran$fer are online an& in one &irection onl(. 7i$tribute& .roce$$ing an& &ata tran$fer are online an& in bot/ &irection$. 3roce$$ing function$ are &(na*icall( .erfor*e& on t/e *o$t a..ro.riate co*.onent of t/e $($te*.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

58

CS605 Software Engineering-II

VU

3. 1E4./4-#NCE
9..lication .erfor*ance ob8ecti2e$% $tate& or a..ro2e& b( t/e u$er% in either re$.on$e or t/roug/.ut% influence Hor will influenceJ t/e &e$ign% &e2elo.*ent% in$tallation% an& $u..ort of t/e a..lication. Score #%< 0 No $.ecial .erfor*ance re'uire*ent$ were $tate& b( t/e u$er. 1 3erfor*ance an& &e$ign re'uire*ent$ were $tate& an& re2iewe& but no $.ecial action$ were re'uire&. 2 ,e$.on$e ti*e or t/roug/.ut i$ critical &uring .ea4 /our$. No $.ecial &e$ign for C31 utili+ation wa$ re'uire&. 3roce$$ing &ea&line i$ for t/e ne5t bu$ine$$ &a(. 3 ,e$.on$e ti*e or t/roug/.ut i$ critical &uring all bu$ine$$ /our$. No $.ecial &e$ign for C31 utili+ation wa$ re'uire&. 3roce$$ing &ea&line re'uire*ent$ wit/ interfacing $($te*$ are con$training. 4 In a&&ition% $tate& u$er .erfor*ance re'uire*ent$ are $tringent enoug/ to re'uire .erfor*ance anal($i$ ta$4$ in t/e &e$ign ./a$e. 5 In a&&ition% .erfor*ance anal($i$ tool$ were u$e& in t/e &e$ign% &e2elo.*ent% an&Oor i*.le*entation ./a$e$ to *eet t/e $tate& u$er .erfor*ance re'uire*ent$.

5. @E#VILA USE+ C/N.IFU4#TI/N


9 /ea2il( u$e& o.erational configuration% re'uiring $.ecial &e$ign con$i&eration$% i$ a c/aracteri$tic of t/e a..lication. =or e5a*.le% t/e u$er want$ to run t/e a..lication on e5i$ting or co**itte& e'ui.*ent t/at will be /ea2il( u$e&. Score #%< 0 1 2 3 4 5 No e5.licit or i*.licit o.erational re$triction$ are inclu&e&. A.erational re$triction$ &o e5i$t% but are le$$ re$tricti2e t/an a t(.ical a..lication. No $.ecial effort i$ nee&e& to *eet t/e re$triction$. So*e $ecurit( or ti*ing con$i&eration$ are inclu&e&. S.ecific .roce$$or re'uire*ent$ for a $.ecific .iece of t/e a..lication are inclu&e&. State& o.eration re$triction$ re'uire $.ecial con$traint$ on t/e a..lication in t/e central .roce$$or or a &e&icate& .roce$$or. In a&&ition% t/ere are $.ecial con$traint$ on t/e a..lication in t/e &i$tribute& co*.onent$ of t/e $($te*.

5. T4#NS#CTI/N 4#TE
T/e tran$action rate i$ /ig/ an& it influence& t/e &e$ign% &e2elo.*ent% in$tallation% an& $u..ort of t/e a..lication. Score #%< 1 2 3 4 3ea4 tran$action .erio& He.g.% *ont/l(% 'uarterl(% $ea$onall(% annuall(J i$ antici.ate&. ;ee4l( .ea4 tran$action .erio& i$ antici.ate&. 7ail( .ea4 tran$action .erio& i$ antici.ate&. >ig/ tran$action rateH$J $tate& b( t/e u$er in t/e a..lication re'uire*ent$ or $er2ice le2el agree*ent$ are /ig/ enoug/ to re'uire .erfor*ance anal($i$ ta$4$ in t/e &e$ign ./a$e.
59

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II 5

VU

>ig/ tran$action rateH$J $tate& b( t/e u$er in t/e a..lication re'uire*ent$ or $er2ice le2el agree*ent$ are /ig/ enoug/ to re'uire .erfor*ance anal($i$ ta$4$ an&% in a&&ition% re'uire t/e u$e of .erfor*ance anal($i$ tool$ in t/e &e$ign% &e2elo.*ent% an&Oor in$tallation ./a$e$. Anline &ata entr( an& control function$ are .ro2i&e& in t/e a..lication.

6. /NLINE +#T# ENT4A


An-line &ata entr( an& control infor*ation function$ are .ro2i&e& in t/e a..lication. Score #%< 0 1 2 3 4 5 9ll tran$action$ are .roce$$e& in batc/ *o&e. 1B to !B of tran$action$ are interacti2e &ata entr(. B to 15B of tran$action$ are interacti2e &ata entr(. 16B to 23B of tran$action$ are interacti2e &ata entr(. 24B to 30B of tran$action$ are interacti2e &ata entr(. #ore t/an 30B of tran$action$ are interacti2e &ata entr(.

>. EN+-USE4 E..ICIENCA


T/e online function$ .ro2i&e& e*./a$i+e a &e$ign for en&-u$er efficienc(. T/e &e$ign inclu&e$6 Na2igational ai&$ Hfor e5a*.le% function 4e($% 8u*.$% &(na*icall( generate& *enu$J #enu$ Anline /el. an& &ocu*ent$ 9uto*ate& cur$or *o2e*ent Scrolling ,e*ote .rinting H2ia online tran$action$J 3re-a$$igne& function 4e($ )atc/ 8ob$ $ub*itte& fro* online tran$action$ Cur$or $election of $creen &ata >ea2( u$e of re2er$e 2i&eo% /ig/lig/ting% color$ un&erlining% an& ot/er in&icator$ >ar& co.( u$er &ocu*entation of online tran$action$ #ou$e interface 3o.-u. win&ow$. 9$ few $creen$ a$ .o$$ible to acco*.li$/ a bu$ine$$ function )ilingual $u..ort H$u..ort$ two language$C count a$ four ite*$J #ultilingual $u..ort H$u..ort$ *ore t/an two language$C count a$ $i5 ite*$J

Score #%< 0 1 2 3 None of t/e abo2e. Ane to t/ree of t/e abo2e. =our to fi2e of t/e abo2e. Si5 or *ore of t/e abo2e% but t/ere are no $.ecific u$er re'uire*ent$ relate& to efficienc(.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

60

CS605 Software Engineering-II 4 5

VU

Si5 or *ore of t/e abo2e% an& $tate& re'uire*ent$ for en& u$er efficienc( are $trong enoug/ to re'uire &e$ign ta$4$ for /u*an factor$ to be inclu&e& Hfor e5a*.le% *ini*i+e 4e( $tro4e$% *a5i*i+e &efault$% u$e of te*.late$J. Si5 or *ore of t/e abo2e% an& $tate& re'uire*ent$ for en& u$er efficienc( are $trong enoug/ to re'uire u$e of $.ecial tool$ an& .roce$$e$ to &e*on$trate t/at t/e ob8ecti2e$ /a2e been ac/ie2e&.

?. /NLINE U1+#TE
T/e a..lication .ro2i&e$ online u.&ate for t/e internal logical file$. Score #%< 0 1 2 3 4 5 None. Anline u.&ate of one to t/ree control file$ i$ inclu&e&. 0olu*e of u.&ating i$ low an& reco2er( i$ ea$(. Anline u.&ate of four or *ore control file$ i$ inclu&e&. 0olu*e of u.&ating i$ low an& reco2er( ea$(. Anline u.&ate of *a8or internal logical file$ i$ inclu&e&. In a&&ition% .rotection again$t &ata lo$t i$ e$$ential an& /a$ been $.eciall( &e$igne& an& .rogra**e& in t/e $($te*. In a&&ition% /ig/ 2olu*e$ bring co$t con$i&eration$ into t/e reco2er( .roce$$. >ig/l( auto*ate& reco2er( .roce&ure$ wit/ *ini*u* o.erator inter2ention are inclu&e&.

B. C/-1LE: 14/CESSINF
Co*.le5 .roce$$ing i$ a c/aracteri$tic of t/e a..lication. T/e following co*.onent$ are .re$ent6 Sen$iti2e control Hfor e5a*.le% $.ecial au&it .roce$$ingJ an&Oor a..lication $.ecific $ecurit( .roce$$ing E5ten$i2e logical .roce$$ing E5ten$i2e *at/e*atical .roce$$ing #uc/ e5ce.tion .roce$$ing re$ulting in inco*.lete tran$action$ t/at *u$t be .roce$$e& again% for e5a*.le% inco*.lete 9T# tran$action$ cau$e& b( T3 interru.tion% *i$$ing &ata 2alue$% or faile& 2ali&ation$ Co*.le5 .roce$$ing to /an&le *ulti.le in.utOout.ut .o$$ibilitie$% for e5a*.le% *ulti*e&ia% or &e2ice in&e.en&ence

Score #%< 0 1 2 3 4 5 None of t/e abo2e. 9n( one of t/e abo2e. 9n( two of t/e abo2e. 9n( t/ree of t/e abo2e. 9n( four of t/e abo2e. 9ll fi2e of t/e abo2e.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

61

CS605 Software Engineering-II

VU

10. 4EUS#"ILITA
T/e a..lication an& t/e co&e in t/e a..lication /a2e been $.ecificall( &e$igne&% &e2elo.e&% an& $u..orte& to be u$able in other a..lication$. Score #%< 0 1 2 3 4 5 No reu$able co&e. ,eu$able co&e i$ u$e& wit/in t/e a..lication. Le$$ t/an 10B of t/e a..lication con$i&ere& *ore t/an one u$erQ$ nee&$. Ten .ercent H10BJ or *ore of t/e a..lication con$i&ere& *ore t/an one u$erQ$ nee&$. T/e a..lication wa$ $.ecificall( .ac4age& an&Oor &ocu*ente& to ea$e re-u$e% an& t/e a..lication i$ cu$to*i+e& b( t/e u$er at $ource co&e le2el. T/e a..lication wa$ $.ecificall( .ac4age& an&Oor &ocu*ente& to ea$e re-u$e% an& t/e a..lication i$ cu$to*i+e& for u$e b( *ean$ of u$er .ara*eter *aintenance.

11. INST#LL#TI/N E#SE


Con2er$ion an& in$tallation ea$e are c/aracteri$tic$ of t/e a..lication. 9 con2er$ion an& in$tallation .lan an&Oor con2er$ion tool$ were .ro2i&e& an& te$te& &uring t/e $($te* te$t ./a$e. Score #%< 0 1 2 3 4 5 No $.ecial con$i&eration$ were $tate& b( t/e u$er% an& no $.ecial $etu. i$ re'uire& for in$tallation. No $.ecial con$i&eration$ were $tate& b( t/e u$er but $.ecial $etu. i$ re'uire& for in$tallation. Con2er$ion an& in$tallation re'uire*ent$ were $tate& b( t/e u$er% an& con2er$ion an& in$tallation gui&e$ were .ro2i&e& an& te$te&. T/e i*.act of con2er$ion on t/e .ro8ect i$ not con$i&ere& to be i*.ortant. Con2er$ion an& in$tallation re'uire*ent$ were $tate& b( t/e u$er% an& con2er$ion an& in$tallation gui&e$ were .ro2i&e& an& te$te&. T/e i*.act of con2er$ion on t/e .ro8ect i$ con$i&ere& to be i*.ortant. In a&&ition to 2 abo2e% auto*ate& con2er$ion an& in$tallation tool$ were .ro2i&e& an& te$te&. In a&&ition to 3 abo2e% auto*ate& con2er$ion an& in$tallation tool$ were .ro2i&e& an& te$te&.

10. /1E4#TI/N#L E#SE


A.erational ea$e i$ c/aracteri$tic of t/e a..lication. Effecti2e $tart-u.% bac4-u.% an& reco2er( .roce&ure$ were .ro2i&e& an& te$te& &uring t/e $($te* te$t ./a$e. T/e a..lication *ini*i+e$ t/e nee& for *anual acti2itie$% $uc/ a$ ta.e *ount$% .a.er /an&ling% an& &irect on-location *anual inter2ention. Score #%< 0 No $.ecial o.erational con$i&eration$ ot/er t/an t/e nor*al bac4-u. .roce&ure$ were $tate& b( t/e u$er.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

62

CS605 Software Engineering-II

VU

1 - 4 Ane% $o*e% or all of t/e following ite*$ a..l( to t/e a..lication. Select all t/at a..l(. Eac/ ite* /a$ a .oint 2alue of one% e5ce.t a$ note& ot/erwi$e. Effecti2e $tart-u.% bac4-u.% an& reco2er( .roce$$e$ were .ro2i&e&% but o.erator inter2ention i$ re'uire&. Effecti2e $tart-u.% bac4-u.% an& reco2er( .roce$$e$ were .ro2i&e&% but no o.erator inter2ention i$ re'uire& Hcount a$ two ite*$J. T/e a..lication *ini*i+e$ t/e nee& for ta.e *ount$. T/e a..lication *ini*i+e$ t/e nee& for .a.er /an&ling. T/e a..lication i$ &e$igne& for unatten&e& o.eration. 1natten&e& o.eration *ean$ no operator intervention i$ re'uire& to o.erate t/e $($te* ot/er t/an to $tart u. or $/ut &own t/e a..lication. 9uto*atic error reco2er( i$ a feature of t/e a..lication.

13. -ULTI1LE SITES


T/e a..lication /a$ been $.ecificall( &e$igne&% &e2elo.e&% an& $u..orte& to be in$talle& at *ulti.le $ite$ for *ulti.le organi+ation$. Score #%<

0 1 2 3 4 5

1$er re'uire*ent$ &o not re'uire con$i&ering t/e nee&$ of *ore t/an one u$erOin$tallation $ite. Nee&$ of *ulti.le $ite$ were con$i&ere& in t/e &e$ign% an& t/e a..lication i$ &e$igne& to o.erate onl( un&er i&entical /ar&ware an& $oftware en2iron*ent$. Nee&$ of *ulti.le $ite$ were con$i&ere& in t/e &e$ign% an& t/e a..lication i$ &e$igne& to o.erate onl( under similar /ar&ware an&Oor $oftware en2iron*ent$. Nee&$ of *ulti.le $ite$ were con$i&ere& in t/e &e$ign% an& t/e a..lication i$ &e$igne& to o.erate under different /ar&ware an&Oor $oftware en2iron*ent$. 7ocu*entation an& $u..ort .lan are .ro2i&e& an& te$te& to $u..ort t/e a..lication at *ulti.le $ite$ an& t/e a..lication i$ a$ &e$cribe& b( 1 or 2. 7ocu*entation an& $u..ort .lan are .ro2i&e& an& te$te& to $u..ort t/e a..lication at *ulti.le $ite$ an& t/e a..lication i$ a$ &e$cribe& b( 3.

15. .#CILIT#TE C@#NFE


T/e a..lication /a$ been $.ecificall( &e$igne&% &e2elo.e&% an& $u..orte& to facilitate c/ange. T/e following c/aracteri$tic$ can a..l( for t/e a..lication6 =le5ible 'uer( an& re.ort facilit( i$ .ro2i&e& t/at can /an&le $i*.le re'ue$t$C for e5a*.le% and+or logic a..lie& to onl( one internal logical file Hcount a$ one ite*J. =le5ible 'uer( an& re.ort facilit( i$ .ro2i&e& t/at can /an&le re'ue$t$ of a2erage co*.le5it(% for e5a*.le% and+or logic a..lie& to *ore t/an one internal logical file Hcount a$ two ite*$J. =le5ible 'uer( an& re.ort facilit( i$ .ro2i&e& t/at can /an&le co*.le5 re'ue$t$% for e5a*.le% and+or logic co*bination$ on one or *ore internal logical file$ Hcount a$ t/ree ite*$J. )u$ine$$ control &ata i$ 4e.t in table$ t/at are *aintaine& b( t/e u$er wit/ online interacti2e .roce$$e$% but c/ange$ ta4e effect onl( on t/e ne5t bu$ine$$ &a(. )u$ine$$ control &ata i$ 4e.t in table$ t/at are *aintaine& b( t/e u$er wit/ online interacti2e .roce$$e$% an& t/e c/ange$ ta4e effect i**e&iatel( Hcount a$ two ite*$J.
63

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

Score #%<

0 1 2 3 4 5

None of t/e abo2e. 9n( one of t/e abo2e. 9n( two of t/e abo2e. 9n( t/ree of t/e abo2e. 9n( four of t/e abo2e. 9ll fi2e of t/e abo2e.

Adjusted F Count
Eac/ of t/e$e factor$ i$ $core& ba$e& between 0-5 on t/eir influence on t/e $($te* being counte&. T/e re$ulting $core will increa$e or &ecrea$e t/e 1na&8u$te& =unction 3oint count b( 35B. T/i$ calculation .ro2i&e$ u$ wit/ t/e 9&8u$te& =unction 3oint count. 7egree of Influence H7IJ Z $u* of $core$ of 14 general $($te* c/aracteri$tic$ 0alue 9&8u$t*ent =actor H09=J Z 0.65 P 7I O 100 T/e final =unction 3oint Count i$ obtaine& b( *ulti.l(ing t/e 09= ti*e$ t/e 1na&8u$te& =unction 3oint H1=3J. =3 Z 1=3 T 09=

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

64

CS605 Software Engineering-II

VU

Lecture No. 10 Software 1roce%% and 1ro9ect -etric%


E2er(one a$4$ t/i$ 'ue$tion6 /ow &o I i&entif( t/e .roble*L T/e an$wer i$ *ea$ure (our .roce$$. #ea$ure*ent /el.$ in i&entification of t/e .roble* a$ well a$ in &eter*ining t/e effecti2ene$$ of t/e re*e&(. #ea$ure*ent i$ fun&a*ental for .ro2i&ing *ec/ani$*$ for ob8ecti2e e2aluation of an( .roce$$ or acti2it(. 9ccor&ing to Lor& Iel2in6 ,hen you can measure what you are speaking about and express it in numbers, you know something about it- but when you cannot measure, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind. it may be the beginning of knowledge, but you have scarcely, in your thoughts, advanced to the stage of a science. In or&er to un&er$tan& w/at (our .roble*$ are% (ou nee& to *ea$ure. Anl( t/en a re*e&( can be a..lie&. Ta4e t/e e5a*.le of a &octor. >e *ea$ure$ an& *onitor$ &ifferent t(.e$ of rea&ing$ fro* a .atient Hte*.erature% /eart beat% bloo& .re$$ure% bloo& c/e*i$tr(% etcJ before .ro.o$ing a *e&icine. 9fter gi2ing t/e *e&icine% t/e &octor *onitor$ t/e effect of t/e *e&icine t/roug/ t/e follow-u. 2i$it$ an& *a4e$ t/e nece$$ar( a&8u$t*ent$. T/i$ .roce$$ of *ea$ure*ent% correction an& fee&bac4 i$ in/erent in all 4in&$ of $($te*$. Software i$ no e5ce.tionR T/e i&ea i$ to *ea$ure (our .ro&uct an& .roce$$ to i*.ro2e it continuou$l(. Now t/e 'ue$tion i$6 /ow can we *ea$ure t/e 'ualit( of a $oftware .roce$$ an& $($te*L Software .ro8ect *anage*ent .ri*aril( &eal$ wit/ *etric$ relate& to .ro&ucti2it( an& 'ualit(. =or .lanning an& e$ti*ation .ur.o$e$% we loo4 at t/e /i$toric &ata F .ro&ucti2it( of our tea* an& t/e 'ualit( of t/eir &eli2erable$ in t/e .a$t .ro8ect$. T/i$ &ata fro* t/e .re2iou$ effort$ i$ u$e& to &eter*ine an& e$ti*ate t/e effort re'uire& in our current .ro8ect to &eli2er a .ro&uct wit/ a .re&ictable 'ualit(. T/i$ &ata i$ al$o u$e& to anal(+e t/e $($te* bottlenec4$ an& /el.$ u$ in i*.ro2ing t/e .ro&ucti2it( of our tea* an& t/e 'ualit( of our .ro&uct.

-ea%ure%D -etric% and Indicator%


)efore we can tal4 about t/e *ea$ure*ent .roce$$% we fir$t nee& to un&er$tan& t/e ter*$ measure, metrics, an& indicators. T/e ter*$ measure, measurement, an& metrics are often u$e& interc/angeable but t/ere are $ignificant &ifference$ a*ong t/e*. ;it/in t/e $oftware engineering &o*ain% a *ea$ure .ro2i&e$ a 'uantitati2e 2alue of $o*e attribute of a .roce$$ or a .ro&uct. =or e5a*.le% $i+e i$ one *ea$ure of a $oftware .ro&uct. #ea$ure*ent i$ t/e .roce$$ or *ec/ani$* t/roug/ w/ic/ t/e *ea$ure i$ ta4en. =or e5a*.le% =3 anal($i$ i$ a *ec/ani$* to *ea$ure t/e $i+e of $oftware. #ea$ure*ent in2ol2e$ ta4ing one or *ore &ata .oint$ relate& to $o*e a$.ect of t/e .ro&uct or .roce$$. Software *etric relate$ in&i2i&ual $oftware *ea$ure$ to .ro2i&e a nor*ali+e& 2iew. =or e5a*.le% &efect$ .er function .oint are one *etric w/ic/ relate$ two in&i2i&ual *ea$ure$% t/at i$% &efect$ an& $i+e% into one *etric. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
65

CS605 Software Engineering-II

VU

#etric$ gi2e (ou a better in$ig/t into t/e $tate of t/e .roce$$ or .ro&uct. T/e$e in$ig/t$ are not t/e .roble*$ but 8u$t t/e indicators of .roble*$. 9 $oftware engineer$ collect$ *ea$ure$ an& &e2elo.$ *etric$ an& in&icator$. To* Gilb $a($% D9n(t/ing t/at (ou nee& to 'uantif( can be *ea$ure& in $o*e wa( t/at i$ $u.erior to not *ea$uring at allRE T/i$ 'uote /a$ two *e$$age$6 1. 9n(t/ing can be *ea$ure& 2. It i$ alwa($ better to *ea$ure t/an not &oing it e2en if (ou &o not /a2e a goo& *ea$uring &e2iceC it alwa($ gi2e$ (ou $o*e infor*ation t/at (ou can u$e.

-etric% for %oftware &ualit2


T/e *o$t i*.ortant ob8ecti2e of an( engineering acti2it( i$ to .ro&uce /ig/ 'ualit( .ro&uct wit/ li*ite& re$ource$ an& ti*e. T/e 'ualit( of t/e .ro&uct cannot be &eter*ine& if it i$ be *ea$ure&. T/e 'ualit( of t/e en& re$ult &e.en&$ u.on t/e 'ualit( of t/e inter*e&iate wor4 .ro&uct$. If t/e re'uire*ent$% &e$ign% co&e% an& te$ting function$ are of /ig/ 'ualit(% t/en t/e c/ance$ are t/at t/e en& .ro&uct will al$o be of goo& 'ualit(. So% a goo& $oftware engineer woul& a&o.t *ec/ani$*$ to *ea$ure t/e 'ualit( of t/e anal($i$ an& &e$ign *o&el$% t/e $ource co&e% an& t/e te$t ca$e$. 9t t/e .ro8ect le2el% t/e .ri*ar( focu$ i$ to *ea$ure error$ an& &efect$ an& &eri2e rele2ant *etric$ $uc/ a$ re'uire*ent or &e$ign error$ .er function .oint% error$ unco2ere& .er re2iew /our% error$ .er t/ou$an& line$ of co&e. T/e$e *etric$ .ro2i&e an in$ig/t into t/e effecti2ene$$ of t/e 'ualit( a$$urance acti2itie$ at t/e tea* a$ well a$ in&i2i&ual le2el.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

66

CS605 Software Engineering-II

VU

Lecture No. 13 Software ;ualit2 .actor%


In 1"! % #cCall i&entifie& factor$ t/at coul& be u$e& to &e2elo. *etric$ for t/e $oftware 'ualit(. T/e$e factor$ tr( to a$$e$$ t/e inner 'ualit( of $oftware fro* factor$ t/at can be ob$er2e& fro* out$i&e. T/e ba$ic i&ea i$ t/at t/e 'ualit( of t/e $oftware can be inferre& if we *ea$ure certain attribute$ once t/e .ro&uct i$ .ut to actual u$e. Ance co*.lete& an& i*.le*ente&% it goe$ t/roug/ t/ree ./a$e$6 o.eration Hw/en it i$ u$e&J% &uring re2i$ion$ Hw/en it goe$ t/roug/ c/ange$J% an& &uring tran$ition$ Hw/en it i$ .orte& to &ifferent en2iron*ent$ an& .latfor*$J. 7uring eac/ one of t/e$e ./a$e$% &ifferent t(.e$ of &ata can be collecte& to *ea$ure t/e 'ualit( of t/e .ro&uct. #cCall:$ *o&el i$ &e.icte& an& e5.laine& a$ follow$.

.actor% related wit! o*eration $ Correctne$$ + T/e e5tent to w/ic/ a .rogra* $ati$fie$ it$ $.ecification$ an& fulfill$ t/e cu$to*er:$ *i$$ion ob8ecti2e$ $ ,eliabilit( + T/e e5tent to w/ic/ a .rogra* can be e5.ecte& to .erfor* it$ inten&e& function wit/ re'uire& .reci$ion. Efficienc( + T/e a*ount of co*.uting re$ource$ re'uire& b( a .rogra* to .erfor* it$ function Integrit( + E5tent to w/ic/ acce$$ to $oftware or &ata b( unaut/ori+e& .er$on$ can be controlle&. 1$abilit( + Effort re'uire& to learn% o.erate% .re.are in.ut% an& inter.ret out.ut of a .rogra*

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

67

CS605 Software Engineering-II .actor% related wit! re,i%ion $ $ $ #aintainabilit( + Effort re'uire& to locate an& fi5 an error in a .rogra* =le5ibilit( + Effort re'uire& to *o&if( an o.erational .rogra*

VU

Te$tabilit( + Effort re'uire& to te$t a .rogra* to en$ure t/at it .erfor*$ it$ inten&e& function

.actor% related wit! ada*tation $ 3ortabilit( + Effort re'uire& tran$ferring t/e .rogra* fro* one /ar&ware an&Oor $oftware $($te* en2iron*ent to anot/er. ,eu$abilit( + E5tent to w/ic/ a .rogra* can be reu$e& in ot/er a..lication$ Intero.erabilit( + Effort re'uire& to cou.le one $($te* to anot/er.

$ $

It i$ intere$ting to note t/at t/e fiel& of co*.uting an& it$ t/eoretical /a2e gone t/roug/ ./eno*enal c/ange$ but #cCall:$ 'ualit( factor$ are $till a$ rele2ant a$ t/e( were al*o$t 25 (ear$ ago.

!easuring Quality
Gilb e5ten&$ #cCall:$ i&ea an& .ro.o$e$ t/at t/e 'ualit( can be *ea$ure& if we *ea$ure t/e correctne$$% *aintainabilit(% integrit(% an& u$abilit( of t/e .ro&uct. Correctne$$ i$ &efine& a$ t/e &egree to w/ic/ $oftware .erfor*$ it$ function. It can be *ea$ure& in &efect$OILAC or &efect$O=3 w/ere &efect$ are &efine& a$ 2erifie& lac4 of confor*ance to re'uire*ent$. T/e$e are t/e .roble*$ re.orte& b( t/e u$er after relea$e. T/e$e are counte& o2er a $tan&ar& .erio& of ti*e w/ic/ i$ t(.icall( &uring t/e fir$t (ear of o.eration. #aintainabilit( i$ &efine& a$ t/e ea$e wit/ w/ic/ a .rogra* can be correcte& if an error i$ encountere&% a&a.te& if en2iron*ent c/ange$% en/ance& if t/e cu$to*er re'uire$ an en/ance*ent in functionalit(. It i$ an in&irect *ea$ure of t/e 'ualit(. 9 $i*.le ti*e oriente& *etric to gauge t/e *aintainabilit( i$ 4nown a$ ##TC F *ean ti*e to c/ange. It i$ &efine& a$ t/e ti*e it ta4e$ to anal(+e t/e c/ange re'ue$t% &e$ign an a..ro.riate *o&ification% i*.le*ent t/e c/ange% te$t it% an& i*.le*ent it. 9 co$t oriente& *etric u$e& to a$$e$$ *aintainabilit( i$ calle& S.oilage. It i$ &efine& a$ t/e co$t to correct &efect$ encountere& after t/e $oftware /a$ been relea$e& to t/e u$er$. S.oilage co$t i$ .lotte& again$t t/e o2erall .ro8ect co$t a$ a function of ti*e to &eter*ine w/et/er t/e o2erall *aintainabilit( of $oftware .ro&uce& b( t/e organi+ation i$ i*.ro2ing. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
68

CS605 Software Engineering-II

VU

Integrit( i$ an e5tre*el( i*.ortant *ea$ure e$.eciall( in to&a(:$ conte5t w/en t/e $($te* i$ e5.o$e& to all $ort$ to attac4$ becau$e of t/e internet ./eno*enon. It i$ &efine& a$ $oftware:$ abilit( to wit/$tan& attac4 Hbot/ acci&ental an& intentionalJ to it$ $ecurit(. It inclu&e$ integrit( of .rogra*% &ata% an& &ocu*ent$. To *ea$ure integrit(% two a&&itional attribute$ are nee&e&. T/e$e are6 t/reat an& $ecurit(. T/reat i$ t/e .robabilit( H&eri2e& or *ea$ure& fro* e*.irical e2i&enceJ t/at an attac4 of a $.ecific t(.e will occur wit/in a gi2en ti*e an& $ecurit( i$ t/e .robabilit( t/at an attac4 of a $.ecific t(.e will be re.elle&. So t/e integrit( of a $($te* i$ &efine& a$ t/e $u* of all t/e .robabilit( t/at t/e t/reat of a $.ecific t(.e will not ta4e .lace an& t/e .robabilit( t/at if t/at t/reat &oe$ ta4e .lace% it will not be re.elle&. Integrit( Z [ \H1-t/reatJ 5 H1-$ecurit(J] =inall(% u$abilit( i$ a *ea$ure of u$er frien&line$$ F t/e ea$e wit/ w/ic/ a $($te* can be u$e&. It can be *ea$ure& in ter*$ of 4 c/aracteri$tic$6 $ $ $ $ 3/($ical or intellectual $4ill re'uire& learn t/e $($te* T/e ti*e re'uire& to beco*e *o&eratel( efficient in t/e u$e of $($te* T/e net increa$e in .ro&ucti2it( 9 $ub8ecti2e a$$e$$*ent

It i$ i*.ortant to note t/at e5ce.t for t/e u$abilit(% t/e ot/er t/ree factor$ are e$$entiall( t/e $a*e a$ .ro.o$e& b( #cCall.

"e#ect $emo%al E##iciency


7efect re*o2al efficienc( i$ t/e *ea$ure of /ow *an( &efect$ are re*o2e& b( t/e 'ualit( a$$urance .roce$$e$ before t/e .ro&uct i$ $/i..e& for o.eration. It i$ t/erefore a *ea$ure t/at &eter*ine$ t/e effecti2ene$$ of t/e @9 .roce$$e$ &uring &e2elo.*ent. It i$ u$eful at bot/ t/e .ro8ect an& .roce$$ le2el. 7efect re*o2al efficienc( i$ calculate& a$ t/e nu*ber of &efect re*o2e& before $/i.*ent a$ a .ercentage of total &efect$ 7,E Z EOHEP7J ;/ere $ E F error$ foun& before &eli2er( $ 7 F error$ foun& after &eli2er( Ht(.icall( wit/in t/e fir$t (ear of o.erationJ ,egar&ing t/e effecti2ene$$ of 2ariou$ @9 acti2itie$% Ca.er$ ?one$ .ubli$/e& $o*e &ata in 1""! w/ic/ i$ $u**ari+e& in t/e following table.
Design Inspection Code Inspection ualit! "ssurance Testing #orst 3$% to 3&% '$% t/e ''% ('% &'% of &&% )'% *'% In t/i$ re$earc/% t/e( trie& *ea$ure effecti2ene$$ 4 &ifferent acti2itie$ na*el( +edian ,$% '3% ('% &$% )$% )&% *$% an& *&% **% &e$ign in$.ection% co&e in$.ection% 'ualit( a$$urance function% te$ting. It i$ i*.ortant Best '$% ($% &'% )$% )&% *3% *'% **% **-*% to note t/at te$ting alone onl( (iel&$ a 7,E of 40B on t/e a2erage. >owe2er% w/en it i$

co*bine& wit/ &e$ign an& co&e in$.ection% t/e 7,E reac/e$ "!B. T/at *ean$% co&e an& - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
69

CS605 Software Engineering-II

VU

&e$ign in$.ection are e5tre*el( i*.ortant acti2ate$ t/at are unfortunatel( not gi2en t/eir &ue i*.ortance.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

70

CS605 Software Engineering-II

VU

Lecture No. 15 -etric% for %*ecification &ualit2


9$ *entione& earlier% t/e 'ualit( of t/e $oftware $.ecification i$ of e5tre*e i*.ortance a$ t/e entire buil&ing of $oftware i$ built on t/i$ foun&ation. 9 re'uire*ent $.ecification &ocu*ent i$ *ea$ure& in ter*$ of lac4 of a*biguit(% co*.letene$$% con$i$tenc(% correctne$$C un&er$tan& abilit(% 2erifiabilit(% ac/ie2abilit(% conci$ion% traceabilit(% *o&ifiabilit(% .reci$ion% an& reu$abilit(. #etric$ to a$$e$$ t/e 'ualit( of t/e anal($i$ *o&el$ an& t/e corre$.on&ing $oftware $.ecification were .ro.o$e& b( 7a2i$ in 1""3 for t/e$e $ee*ingl( 'ualitati2e c/aracteri$tic$. =or e5a*.le% t/e nu*ber$ of re'uire*ent$ are calculate& a$6 nr Z nf P nnf w/ere nr F total nu*ber of re'uire*ent$ nf F functional re'uire*ent$ nnf F non-functional re'uire*ent$ Now lac4 of a*biguit( in t/e re'uire*ent$ i$ calculate& a$6 @1 Z nuiOnr ;/ere nui F nu*ber of re'uire*ent$ for w/ic/ all re2iewer$ /a& i&entical inter.retation Hi.e. una*biguou$ re'uire*ent$J Si*ilarl(% co*.letene$$ i$ *ea$ure$ a$ follow$6 @2 Z nuO \ni 5 n$] nu F uni'ue functional re'uire*ent$ ni F nu*ber of in.ut$ H$ti*uliJ n$ F nu*ber of $tate$ $.ecifie& An t/e $i*ilar line$% t/e 'ualit( of &e$ign i$ al$o *ea$ure& 'uantitati2el(. T/e 'ualit( of t/e arc/itectural &e$ign can be *ea$ure& b( *ea$uring it$ co*.le5it( a$ $/own below6 + Structural co*.le5it( S Z HfoutJ2 + 7ata co*.le5it( 7 Z 2OHfout P 1J $ U2: i$ t/e nu*ber of in.ut an& out.ut 2ariable$ + S($te* co*.le5it( C Z [ HSi P 7iJ - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

71

CS605 Software Engineering-II

VU

"a%eline
In or&er to u$e t/e &ata for e$ti*ation an& &rawing conclu$ion$% it *u$t be ba$e-line&. In t/e ba$eline% &ata fro* .a$t .ro8ect$ i$ collecte&% cleane&% an& .ut in a &ataba$e. Suc/ *etric$ ba$eline i$ u$e& to rea. benefit$ at t/e .roce$$% .ro8ect% an& .ro&uct le2el. 9$ *entione& abo2e% t/e *etric$ ba$eline con$i$t$ of &ata collecte& fro* .a$t .ro8ect o2er a .erio& of ti*e. To be effecti2e% t/e &ata *u$t be rea$onabl( accurate% it $/oul& be collecte& o2er *an( .ro8ect$% *ea$ure$ *u$t be con$i$tent F $a*e tec/ni'ue or (ar&$tic4 for &ata collection $/oul& /a2e been u$e&% a..lication$ $/oul& be $i*ilar to wor4 t/at i$ to be e$ti*ate&% an& fee&bac4 to i*.ro2e ba$eline:$ 'ualit(.

-etric% for %'all organi8ation%


T/e *etric .rogra* can be 'uite co*.le5 an& e5ten$i2e. S*all organi+ation woul& fin& it &ifficult to i*.le*ent a full-fle&ge& *etric$ .rogra* a$ it *a( re'uire 'uite a nu*ber of re$ource$. >owe2er% it i$ i*.ortant to a..reciate t/at a *etric$ .rogra* of e2en a $*aller $cale woul& al$o be of i**en$e 2alue an& t/erefore all organi+ation$ of all $i+e$ $/oul& /a2e $/oul& /a2e one. It can be a 2er( $i*.le an& can be i*.le*ente& wit/ t/e /el. of $i*.le an& ine5.en$i2e tool$ an& *et/o&$. S*all organi+ation$ F aroun& 20 or $o .eo.le F *u$t *ea$ure in a co$t effecti2e *anner. In or&er for it to be effecti2e% it $/oul& be $i*.le an& 2alue-oriente& an& $/oul& focu$ on re$ult rat/er t/an *ea$ure*ent. It i$ i*.ortant to e$tabli$/ t/e ob8ecti2e$ of *ea$ure*ent. T/i$ i$ illu$trate& b( t/e following e5a*.le. Let u$ a$$u*e t/at we wante& to re&uce t/e ti*e to e2aluate an& i*.le*ent c/ange re'ue$t$ in our organi+ation. In or&er to ac/ie2e t/i$ ob8ecti2e% we nee&e& to *ea$ure t/e following6 $ $ $ $ $ $ $ $ Ti*e Hin /our$ or &a($J ela.$e& fro* t/e ti*e a re'ue$t i$ *a&e until e2aluation i$ co*.lete - t'ueue Si+e Hf.J of t/e c/ange re'ue$t Effort Hin .er$on *ont/$J to .erfor* t/e e2aluation- ;e2al Ti*e ela.$e& fro* co*.letion of e2aluation to a$$ign*ent of c/ange or&er F te2al Effort re'uire& to *a4e t/e c/ange F ;c/ange Ti*e re'uire& to *a4e t/e c/ange F tc/ange Error$ unco2ere& &uring wor4 to *a4e c/ange F Ec/ange 7efect$ unco2ere& after c/ange i$ relea$e& F 7c/ange

T/i$ &ata wa$ t/en collecte& an& $tore& in a $i*.le &ataba$e a$ $/own below.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

72

CS605 Software Engineering-II

VU

3ro8ect

Si+e H=3J 120 2!0 200

Effort Co$t H3*J H000J 24 62 43 16 000 440000 314000

,$.3age$ of3re&ocu*entation $/i.*ent error$ 365 1224 1050 134 321 256

3o$t3eo.le $/i.*ent &efect$ 2" 6 64 3 5 6

abc &ef g/i

T/i$ &ata i$ t/en nor*ali+e& on .er function .oint ba$i$ a$ follow$6 3ro8ect Si+e H=3J Effort Co$t H3*J H000J ,$.3age$ of3re&ocu*entation $/i.*ent error$ 3o$t3eo.le $/i.*ent &efect$ 3
0.2 1400 162" 15!0 3.04 4.53 5.25 1.12 1.1" 1.2 0.24

abc &ef g/i

120 2!0
0.23 0.32

5 6
0.22 0.32

200

;e are now rea&( to u$e t/i$ &ata to anal(+e t/e re$ult$ of .roce$$ c/ange$ an& t/eir i*.act on t/e ti*e to i*.le*ent c/ange re'ue$t$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

73

CS605 Software Engineering-II

VU

In or&er to &o t/at% we nee& to e*.lo( $o*e $tati$tical tec/ni'ue$ an& .lot t/e re$ult gra./icall(. T/i$ i$ 4nown a$ $tati$tical control tec/ni'ue$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

74

CS605 Software Engineering-II

VU

Lecture No. 15 Stati%tical Control Tec!ni&ue% E control c!art%


Sa*e .roce$$ *etric$ 2ar( fro* .ro8ect to .ro8ect. ;e /a2e to &eter*ine w/et/er t/e tren& i$ $tati$ticall( 2ali& or not. ;e al$o nee& to &eter*ine w/at c/ange$ are *eaningful. 9 gra./ical tec/ni'ue 4nown a$ control c/art$ i$ u$e& to &eter*ine t/i$. T/i$ tec/ni'ue wa$ initiall( &e2elo.e& for *anufacturing .roce$$e$ in t/e 1"20:$ b( ;alter S/ewart an& i$ $till 2er( a..licable e2en in &i$ci.le$ li4e $oftware engineering. Control c/art$ are of two t(.e$6 *o2ing range control c/art an& in&i2i&ual control c/art. T/i$ tec/ni'ue enable$ in&i2i&ual$ intere$te& in $oftware .roce$$ i*.ro2e*ent to &eter*ine w/et/er t/e &i$.er$ion H2ariabilit(J an& DlocationE H*o2ing a2erageJ of .roce$$ *etric$ are $table Hi.e. t/e .roce$$ e5/ibit$ onl( natural or controlle& c/ange$J or un$table Hi.e. t/e .roce$$ e5/ibit$ out-of-control c/ange$ an& *etric$ cannot be u$e& to .re&ict .erfor*anceJ. Let u$ now &e*on$trate t/e u$e of t/e$e control c/art$ wit/ t/e /el. of an e5a*.le. Let u$ a$$u*e t/at t/e &ata $/own in t/e following table regar&ing t/e a2erage c/ange i*.le*entation ti*e wa$ collecte& o2er t/e la$t 15 *ont/$ for 20 $*all .ro8ect$ in t/e $a*e general $oftware &o*ain 20 .ro8ect$. To i*.ro2e t/e effecti2ene$$ of re2iew$% t/e $oftware organi+ation .ro2i&e& training an& *entoring to all .ro8ect tea* *e*ber$ beginning wit/ .ro8ect 11.
3ro8ect Ti*e Oc/ange i*.le*entation

1 2 3 4 5 6 ! " 10 11 12 13 14 15 16 1! 1 1" 20

3 4.5 1.2 5 3.5 4. 2 4.5 4.!5 2.25 3.!5 5.!5 4.6 3.25 4 5.5 5." 4 3.3 5.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

75

CS605 Software Engineering-II

VU

In or&er to &eter*ine w/et/er our c/ange in .roce$$ /a& an( i*.act% we u$e control c/art$. T/i$ &ata i$ fir$t .re$ente& in t/e gra./ for* a$ follow$6

;e now &e2elo. t/e #o2ing ,ange Control C/art a$ follow$6 1. Calculate t/e *o2ing range$6 t/e ab$olute 2alue$ of t/e $ucce$$i2e &ifference$ between eac/ .air of &ata .oint. 3lot t/e$e *o2ing range$ on (our c/art. Ht/e &ar4 blue lineJ 2. Calculate t/e *ean of t/e *o2ing range$. 3lot t/i$ on t/e c/art. Ht/e re& lineJ 3. #ulti.l( t/e *ean wit/ 3.26 . 3lot t/i$ a$ t/e 1..er Control Line H1CLJ. T/i$ line i$ 3 $tan&ar& &e2iation$ abo2e t/e line. Ht/e lig/t blue lineJ 4. To &eter*ine w/et/er t/e .roce$$ *etric$ &e$cri.tion i$ $table% a $i*.le 'ue$tion i$ a$4e&6 are t/e *o2ing range$ 2alue$ in$i&e t/e 1CLL If t/e an$wer i$ (e$ t/en t/e .roce$$ i$ $table ot/erwi$e it i$ un$table. T/i$ c/art i$ $/own in t/e following &iagra*6

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

76

CS605 Software Engineering-II

VU

T/i$ c/art i$ t/en u$e& to &e2elo. t/e in&i2i&ual control c/art a$ follow$6 1. 3lot in&i2i&ual *etric 2alue$ 2. Co*.ute t/e a2erage 2alue for t/e *etric$ 2alue$ - 9* 3. #ulti.l( t/e *ean of *o2ing a2erage b( 2.66 an& a&& a2erage co*.ute& in $te. 2 abo2e. T/e re$ult i$ 1..er Natural 3roce$$ Li*it H1N3LJ 4. #ulti.l( t/e *ean of *o2ing a2erage b( 2.66 an& $ubtract a2erage co*.ute& in $te. 2 abo2e. T/e re$ult i$ Lower Natural 3roce$$ Li*it HLN3LJ 5. 3lot 1N3L an& LN3L. If LN3L i$ le$$ t/an +ero t/an it nee& not be .lotte& unle$$ t/e *etric being e2aluate& ta4e$ on 2alue$ t/at are le$$ t/an 0. 6. Co*.ute a $tan&ar& &e2iation a$ H1N3L F 9*JO3. !. 3lot line$ 1 an& 2 $tan&ar& &e2iation$ abo2e an& below 9*. . 9..l(ing t/e$e $te.$ we &eri2e an in&i2i&ual control c/art. T/i$ c/art *a( be u$e& to e2aluate w/et/er t/e c/ange$ re.re$ente& b( *etric$ in&icate a .roce$$ t/at i$ in control or out of control. =or t/i$% t/e following 4 criteria +one rule$ are u$e&. 1. 9 $ingle *etric$ 2alue lie$ out$i&e 1N3L 2. Two out of t/ree $ucce$$i2e 2alue$ la( *ore t/an 2 $tan&ar&$ &e2iation$ awa( fro* 9*. 3. =our out of fi2e $ucce$$i2e 2alue$ la( *ore t/an one $tan&ar& &e2iation awa(. 4. Eig/t con$ecuti2e 2alue$ lie on one $i&e of 9*. If an( of t/e$e te$t$ .a$$e$% t/e .roce$$ i$ out of control ot/erwi$e t/e .roce$$ i$ wit/in control. Since none of t/e te$t .a$$e$ for t/e &ata in our e5a*.le% our .roce$$ i$ in control an& t/i$ &ata can be u$e& for inference. ;e now anal(+e our re$ult$. It can be $een t/at t/e 2ariabilit( &ecrea$e& after .ro8ect 10. )( co*.uting t/e *ean 2alue of t/e fir$t 10 an& la$t 10 .ro8ect$% it can be $/own t/at t/e re*e&ial *ea$ure ta4en wa$ $ucce$$ful an& re$ulte& in 2"B i*.ro2e*ent in efficienc( of t/e .roce$$. >ence t/e .roce$$ c/ange$ incor.orate& were u$eful an& bore fruit.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

77

CS605 Software Engineering-II

VU

Lecture No. 16 Inter*reting -ea%ure'ent%


9 goo& *etric $($te* i$ t/e one w/ic/ i$ $i*.le an& c/ea. an& at t/e $a*e ti*e a&&$ a lot of 2alue for t/e *anage*ent. =ollowing are $o*e of t/e e5a*.le$ t/at can be u$e& for effecti2e .ro8ect control an& *anage*ent. ;e can collect &ata about t/e &efect$ re.orte&% an& &efect$ fi5e& an& .lot t/e* in t/e following *anner% wit/ t/eir &ifference $/owing t/e &efect$ (et to be fi5e&. T/i$ can gi2e u$ u$eful infor*ation about t/e $tate of t/e .ro&uct. If t/e ga. between t/e &efect$ re.orte& an& &efect$ fi5e& i$ increa$ing% t/en it *ean$ t/at t/e .ro&uct i$ in un$table con&ition. An t/e ot/er /an& if t/i$ ga. i$ &ecrea$ing t/en we can $a( t/at t/e .ro&uct i$ in a $table con&ition an& we can .lan for $/i.*ent.
Total re#orted defects Defects fi&ed to date Defects yet to !e fi&ed

Defects

Time

Si*ilarl(% we can gain u$eful infor*ation b( .lotting t/e &efect$ re.orte& again$t t/e nu*ber of u$e ca$e$ run. ;e can u$e control line$ fro* our .re2iou$ &ata an& $ee if t/e actual &efect$ are wit/in t/o$e control li*it$. If t/e &efect$ at an( gi2en .oint in ti*e are le$$ t/an t/e lower li*it t/en it *a( *ean t/at out te$ting tea* i$ not &oing a goo& 8ob an& co2erage i$ not a&e'uate. An t/e ot/er /an&% if it cro$$e$ t/e u..er line t/en it in&icate$ t/at t/e &e$ign an& co&ing i$ not u. to *ar4 an& we .er/a.$ nee& to c/ec4 it.

)##er limit

Defects

Actual defects

6o7er limit

Test cases

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

78

CS605 Software Engineering-II

VU

9not/er 2er( $i*.le gra./ a$ $/own below can gi2e a lot of in$ig/t into t/e &e$ign 'ualit(. In t/i$ ca$e% if t/e fre'uenc( of ri..le &efect$ i$ too large% t/en it *ean$ t/at t/en t/ere i$ tig/t cou.ling an& /ence t/e &e$ign i$ not *aintainable.
, 1 3 1 Defect 2 .ipple 1 1 1 $ 1 1 2 3 , ' ( & Defect /i0ed ) *
T2ree ne3 defects appeared as a conse4uence of fi0ing defect '

T/e following i$ (et anot/er 2er( $i*.le an& effecti2e wa( of getting in$ig/t into t/e
, 1 5ot 1 " 1 Defect 3 1 2 1 1 1 $ 1

Time

'ualit( of t/e re'uire*ent$. If a nu*ber of &efect$ t/at are re.orte& b( t/e te$ting tea* are ulti*atel( re$ol2e& a$ not-a-&efect t/en t/ere *a( be a $e2er .roble* wit/ t/e re'uire*ent$ &ocu*ent a$ two tea*$ H&e2elo.*ent an& te$tingJ are inter.reting it &ifferentl( an& /ence co*ing to &ifferent conclu$ion$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

79

CS605 Software Engineering-II

VU

Lecture No. 1> Software 1ro9ect 1lanning


Software .ro8ect .lanning i$ an acti2it( carrie& out b( t/e .ro8ect *anager to e$ti*ate an& a&&re$$ t/e following .oint$6 1. 2. 3. 4. 5. Software $co.e e$ti*ation ,e$ource$ re'uire*ent$ Ti*e re'uire*ent$ Structural &eco*.o$ition ,i$4 anal($i$ an& .lanning

Software %co*e e%ti'ation Software $co.e &e$cribe$ t/e &ata an& control to be .roce$$e&% function% .erfor*ance% con$traint$% interface$% an& reliabilit(. 7eter*ination of t/e $oftware $co.e i$ a .rere'ui$ite of all $ort$ of e$ti*ate$% inclu&ing% re$ource$% ti*e% an& bu&get. In or&er to un&er$tan& t/e $co.e% a *eeting wit/ t/e client $/oul& be arrange&. T/e anal($t $/oul& $tart wit/ &e2elo.ing a relation$/i. wit/ t/e client re.re$entati2e an& $tart wit/ conte5t-free 'ue$tion$. 9n un&er$tan&ing of t/e .ro8ect bac4groun& $/oul& al$o be &e2elo.e&. T/i$ inclu&e$ un&er$tan&ing6 $ $ $ ;/o i$ be/in& t/e re'ue$t H$.on$orJL ;/o will u$e t/e $olution Hu$er$JL ;/at are t/e econo*ic benefit$ Hw/(JL

Now i$ t/e ti*e to a&&re$$ t/e fin& out t/e *ore about t/e .ro&uct. In t/i$ conte5t% t/e following 'ue$tion$ *a( be a$4e&6 $ $ $ $ $ $ $ $ $ >ow woul& (ou c/aracteri+e goo& out.utL ;/at .roble*$ will t/e $olution a&&re$$L Can (ou $/ow *e t/e en2iron*ent in w/ic/ t/e $olution will be u$e&L ;ill an( $.ecial .erfor*ance i$$ue$ or con$traint$ affect t/e wa( t/e $olution i$ a..roac/e&L 9re (ou t/e rig/t .er$on to an$wer t/e$e 'ue$tion$L 9re an$wer$ DofficialEL 9re *( 'ue$tion$ rele2ant to t/e .roble* t/at (ou /a2eL 9* I a$4ing too *an( 'ue$tion$L Can an(one el$e .ro2i&e a&&itional infor*ationL S/oul& I be a$4ing (ou an(t/ing el$eL

In t/i$ regar&$% a tec/ni'ue 4nown a$ .acilitated #**lication S*ecification Tec!ni&ue% or $i*.l( .#ST can be u$e&. T/i$ i$ a tea*-oriente& a..roac/ to re'uire*ent gat/ering t/at i$ u$e& &uring earl( $tage$ of anal($i$ an& $.ecification. In t/i$ ca$e 8oint tea* of cu$to*er$ an& &e2elo.er$ wor4 toget/er to i&entif( t/e .roble*% .ro.o$e ele*ent$ of t/e $olution% negotiate &ifferent a..roac/e$% an& $.ecif( a .reli*inar( $et of re'uire*ent$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

80

CS605 Software Engineering-II

VU

.ea%ibilit2 T/e .ur.o$e of t/e fea$ibilit( anal($i$ i$ to &eter*ine can we buil& $oftware to *eet t/e $co.eL =or t/i$ .ur.o$e% t/e .ro8ect i$ anal(+e& on t/e following 4 &i*en$ion$6 Tec/nolog( K I$ t/e .ro8ect tec/nicall( fea$ibleL K I$ it wit/in t/e $tate of t/e artL K Can &efect$ be re&uce& to a le2el *atc/ing t/e a..lication nee&$L =inance K I$ it financiall( fea$ibleL K Can &e2elo.*ent be co*.lete& at a co$t t/at $oftware organi+ation% it$ client% or t/e *ar4et can affor&L Ti*e K ;ill t/e .ro8ect ti*e to *ar4et beat t/e co*.etitionL K Can we co*.lete t/e .ro8ect in t/e gi2en a*ount of ti*eL ,e$ource$ K 7oe$ t/e organi+ation /a2e re$ource$ nee&e& to $uccee&L T/e re$ource$ inclu&e6 K >;OS; tool$ K ,eu$able $oftware co*.onent$ K 3eo.le Software 1ro9ect E%ti'ation Ance t/e .ro8ect fea$ibilit( /a$ been &eter*ine&% t/e .ro8ect *anager $tart$ t/e e$ti*ation acti2it(. It i$ a relati2el( &ifficult e5erci$e an& /a$ not beco*e an e5act $cience. It i$ influence& b( /u*an% tec/nical% en2iron*ental% .olitical factor$. =or $oftware .ro8ect e$ti*ation% a .ro8ect *anager can u$e /i$toric &ata about it$ organi+ation$ .re2iou$ .ro8ect$% &eco*.o$ition tec/ni'ue$% an&Oor e*.irical *o&el$ &e2elo.e& b( &ifferent re$earc/er$. E'*irical -odel% E*.irical *o&el$ are $tati$tical *o&el$ an& are ba$e& u.on /i$toric &ata. 9lt/oug/ t/ere are *an( &ifferent *o&el$ &e2elo.e& b( &ifferent re$earc/er$% all of t/e* $/are t/e following ba$ic $tructure6 E Z 9 P ) T He2JC w/ere 9% )% c are e*.irical con$tant$% Ue2: i$ t/e effort in ter*$ of line$ of co&e or =3% an& UE: i$ t/e effort in ter*$ of .er$on *ont/$. T/e *o$t fa*ou$ of t/e$e *o&el$ i$ t/e CACA#A - CAn$tructi2e CA$t #A&el F *o&el. It al$o /a$ *an( &ifferent 2er$ion$. T/e $i*.le$t of t/e$e 2er$ion$ i$ gi2en below6 E Z 3.2 HILACJ1.05

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

81

CS605 Software Engineering-II

VU

So*e of t/e$e *o&el$ ta4e into account t/e .ro8ect a&8u$t*ent co*.onent$ inclu&ing .roble* co*.le5it(% $taff e5.erience% an& &e2elo.*ent en2iron*ent. It i$ i*.ortant to note t/at t/ere are a nu*ber of *o&el$ wit/ eac/ (iel&ing a &ifferent re$ult. T/i$ *ean$ t/at an( *o&el *u$t be calibrate& for local nee&$ before it can be effecti2el( u$e&. T!e Software E&uation T/e $oftware e'uation $/own below i$ &(na*ic *ulti2ariable e$ti*ation *o&el. It a$$u*e$ a $.ecific &i$tribution of effort o2er t/e life of t/e $oftware &e2elo.*ent .ro8ect an& i$ &eri2e& fro* .ro&ucti2it( &ata collecte& for o2er 4000 .ro8ect$. E Z \LAC 5 )0.333O3]3 5 H1Ot4J ;/ere6 $ E F effort in .er$on *ont/$ or .er$on (ear$ $ t F .ro8ect &uration in *ont/$ or (ear$ $ ) F $.ecial $4ill factor + Increa$e$ $lowl( a$ t/e nee& for integration% te$ting% @9% &ocu*entation% an& *anage*ent $4ill$ grow $ 3 F .ro&ucti2it( .ara*eter + A2erall .roce$$ *aturit( an& *anage*ent .ractice$ + T/e e5tent to w/ic/ goo& SE .ractice$ are u$e& + T/e le2el of .rogra**ing language u$e& + T/e $tate of t/e $oftware en2iron*ent + T/e $4ill$ an& e5.erience of t/e $oftware tea* + T/e co*.le5it( of t/e a..lication "u2 ,er%u% build It i$ often *ore co$t-effecti2e to ac'uire t/an to buil&. T/ere *a( be $e2eral &ifferent o.tion$ a2ailable. T/e$e inclu&e6 K K K Aff-t/e-$/elf licen$e& $oftware Software co*.onent$ to be *o&ifie& an& integrate& into t/e a..lication Sub-contract

T/e final &eci$ion &e.en&$ u.on t/e criticalit( of t/e $oftware to be .urc/a$e& an& t/e en& co$t. T/e bu( 2er$u$ buil& &eci$ion .roce$$ in2ol2e$ t/e following $te.$6 $ $ $ $ $ 7e2elo. $.ecification for function an& .erfor*ance of t/e &e$ire& $oftware. 7efine *ea$urable c/aracteri$tic$ w/ene2er .o$$ible. E$ti*ate internal co$t an& ti*e to &e2elo. Select 3-4 can&i&ate a..lication$ t/at be$t *eet (our $.ecification$ Select reu$able $oftware co*.onent$ t/at will a$$i$t in con$tructing t/e re'uire& a..lication 7e2elo. co*.ari$on *atri5 t/at .re$ent$ a /ea&-to-/ea& co*.ari$on of 4e( function. 9lternati2el(% con&uct benc/*ar4 te$t$ to co*.are can&i&ate $oftware.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

82

CS605 Software Engineering-II $ $

VU

E2aluate eac/ $oftware .ac4age or co*.onent ba$e& on .a$t .ro&uct 'ualit(% 2en&or $u..ort% .ro&uct &irection% re.utation% etc. Contact ot/er u$er$ of t/e $oftware an& a$4 for o.inion.

T/e following 4e( con$i&eration$ *u$t alwa($ be 4e.t in t/e .er$.ecti2e6 $ 7eli2er( &ate $ 7e2elo.*ent Co$t + 9c'ui$ition P cu$to*i+ation $ #aintenance Co$t 9 &eci$ion tree can be built to anal(+e &ifferent o.tion$ in t/i$ regar&$. 9$ an e5a*.le of t/i$% let u$ con$i&er t/e following. In t/i$ ca$e% we /a2e four &ifferent o.tion$% na*el(% buil&% reu$e% bu(% an& contract. ;e anal(+e eac/ one of t/e$e wit/ t/e /el. of a &eci$ion tree. Eac/ no&e of t/e tree i$ furt/er .artitione& a .robabilit( i$ a$$igne& to eac/ branc/. 9t t/e en&% co$t for eac/ .at/ in t/e tree% fro* root to a leaf% i$ e$ti*ate& an& a$$ociate& wit/ t/at .at/. T/i$ .roce$$ i$ $/own in t/e following &iagra*.
Si*.le H0.30J
)u il&

- 3 0%000

7ifficult H0.!0J - 450%000 #inor c/ange$ H0.40J - 2!5%000


e

u$ ,e
)u (

Si*.le H0.20J - 310%000 #a8or Co*.le5 H0. 0J - 4"0%000 c/ange$ H0.60J #inor c/ange$ H0.!0J - 210%000 #a8or c/ange$ H0.30J - 400%000 ;it/out c/ange$ H0. 0J - 350%000 ;it/ c/ange$ H0.20J - 500%000

Ance t/e infor*ation in t/e tree i$ co*.lete% it i$ u$e& to &eter*ine t/e *o$t 2iable o.tion. =or eac/ o.tion t/e e5.ecte& co$t i$ &eter*ine& a$ follow$6 E5.ecte& co$t Z [ H.at/ .robabilit(JI 5 He$ti*ate& .at/ co$tJ 1$ing t/i$ for*ula% we calculate t/e e5.ecte& co$t of eac/ o.tion a$ follow$6 )uil& Z 0.30T3 0 P 0.!0T450000 Z 42"000 ,eu$e Z 0.4T2!5000 P 0.6T0.2T310000 P 0.6T0. T4"0000 Z 3 2400 T/e e5.ecte& co$t of )u( an& Contract can al$o be calculate& in a $i*ilar fa$/ion an& co*e$ out to be6 )u( Contract Z 26!000 Z 3 0000

T/erefore% accor&ing to t/i$ anal($i$% it i$ *o$t 2iable to bu( t/an an( ot/er o.tion.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

tra on C

ct

83

CS605 Software Engineering-II

VU

Lecture No. 1? 4i%( anal2%i% and 'anage'ent


9nal($i$ an& *anage*ent of .ro8ect ri$4$ i$ al$o a 2er( i*.ortant acti2it( t/at a .ro8ect *anager *u$t .erfor* in or&er to i*.ro2e t/e c/ance$ for t/e .ro8ect. ,obert C/arette &efine$ ri$4 a$ follow$6 /isk concerns future happenings. oday and yesterday are beyond active concern. he question is, can we, therefore, by changing our action today create and opportunity for a different and hopefully better situation for ourselves tomorrow. his means, second, that risk involves change, such as changes in mind, opinion, action, or places. 0 1 hird,2 risks involve choice, and the uncertainty that choice itself entails. ,i$4 anal($i$ an& *anage*ent in2ol2e$ a&&re$$ing t/e following concern$6 1. =uture F w/at ri$4$ *ig/t cau$e t/e .ro8ect to go awr( 2. C/ange F w/at c/ange *ig/t cau$e t/e ri$4 to $tri4e $ >ow c/ange$ in re'uire*ent$% tec/nolog(% .er$onnel an& ot/er entitie$ connecte& to t/e .ro8ect affect t/e .ro8ect 3. C/oice F w/at o.tion$ &o we /a2e for eac/ ri$4 In 3eter 7ruc4er wor&$6 while it is futile to try to eliminate risk, and questionable to try to minimi3e it, it is essential that the risk taken be the right risk. T/ere are two ba$ic ri$4 *anage*ent ./ilo$o./ie$% reacti2e an& .roacti2e. $ $ ,eacti2e F In&iana ?one$ $c/ool of ri$4 *anage*ent + Ne2er worr(ing about .roble*$ until t/e( /a..ene&% an& t/en reacting in $o*e /eroic wa( F In&iana ?one$ $t(le. 3roacti2e + )egin$ long before tec/nical wor4 $tart$ + ,i$4$ are i&entifie&% t/eir .robabilit( an& i*.act are anal(+e&% an& t/e( are ran4e& b( i*.ortance. + ,i$4 *anage*ent .lan it .re.are& $ 3ri*ar( ob8ecti2e i$ to a2oi& ri$4 $ Since all ri$4$ cannot be a2oi&e&% a contingenc( .lan i$ .re.are& t/at will enable it to re$.on& in a controlle& an& effecti2e *anner

1nfortunatel(% In&iana ?one$ $t(le i$ *ore $uitable for fiction an& /a$ a rare c/ance of $ucce$$ in real life $ituation$. It i$ t/erefore i*.erati2e t/at we *anage ri$4 .roacti2el(. 9 ri$4 /a$ two c/aracteri$tic$6 $ 1ncertaint( F t/e ri$4 *a( or *a( not /a..en $ Lo$$ F if t/e ri$4 beco*e$ a realit(% unwante& con$e'uence$ or lo$$e$ will occur.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

84

CS605 Software Engineering-II

VU

9 ri$4 anal($i$ in2ol2e$ 'uantif(ing &egree of uncertaint( of t/e ri$4 an& lo$$ a$$ociate wit/ it. In t/i$ regar&$% t/e 3# trie$ to fin& an$wer$ to t/e following 'ue$tion$6 $ $ $ $ ;/at can go wrongL ;/at i$ t/e li4eli/oo& of it going wrongL ;/at will t/e &a*age beL ;/at can we &o about itL

Lecture No. 1B T2*e% of 4i%(%

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

85

CS605 Software Engineering-II Eac/ .ro8ect i$ face& wit/ *an( t(.e$ of ri$4$. T/e$e inclu&e6 $

VU

3ro8ect ri$4$ + ;ill i*.act $c/e&ule an& co$t + Inclu&e$ bu&getar(% $c/e&ule% .er$onnel% re$ource% cu$to*er% re'uire*ent .roble*$ Tec/nical ri$4$ + I*.act t/e 'ualit(% ti*eline$% an& co$t + I*.le*entation *a( beco*e &ifficult or i*.o$$ible + Inclu&e$ &e$ign% i*.le*entation% interface% 2erification an& *aintenance .roble*$ + Lea&ing e&ge tec/nolog( )u$ine$$ ri$4$ + #ar4etabilit( + 9lign*ent wit/ t/e o2erall bu$ine$$ $trateg( + >ow to $ell + Lo$ing bu&get or .er$onnel co**it*ent$

=urt/er*ore% t/ere are .re&ictable an& un.re&ictable ri$4$. 3re&ictable ri$4$ can be unco2ere& after careful e2aluation w/erea$ un.re&ictable ri$4$ cannot be i&entifie&. 4i%( Identification It i$ t/e re$.on$ibilit( of t/e .ro8ect *anager to i&entif( 4nown an& .re&ictable ri$4$. T/e$e ri$4$ fall in t/e following categorie$ of generic ri$4$ an& .ro&uct $.ecific ri$4$. 4eneric risks are t/reat$ to e2er( .ro8ect w/erea$ *roduct specific risks are $.ecific to a .articular .ro8ect. T/e 'ue$tion to be a$4e& in t/i$ conte5t i$6 w/at $.ecial c/aracteri$tic$ of t/i$ .ro8ect *a( t/reaten (our .ro8ect .lanL 9 u$eful tec/ni'ue in t/i$ regar&$ i$ t/e .re.aration of a ri$4 ite* c/ec4li$t. T/i$ li$t trie$ to a$4 an& an$wer 'ue$tion$ rele2ant to eac/ of t/e following to.ic$ for eac/ $oftware .ro8ect6 $ $ $ $ $ $ $ 3ro&uct $i+e )u$ine$$ i*.act Cu$to*er c/aracteri$tic$ 3roce$$ &efinition 7e2elo.*ent en2iron*ent Tec/nolog( to be built Staff $i+e an& e5.erience

#%%e%%ing /,erall 1ro9ect 4i%(% In or&er to a$$e$$ t/e o2erall .ro8ect ri$4$% t/e following 'ue$tion$ nee& to be a&&re$$e&6 $ $ $ $ $ $ >a2e to. $oftware an& cu$to*er *anager$ for*all( co**itte& to $u..ort t/e .ro8ectL 9re en&-u$er$ co**itte& to t/e .ro8ect an& t/e $($te*O.ro&uct to be builtL 9re re'uire*ent$ full( un&er$too&L >a2e cu$to*er$ been in2ol2e& full( in re'uire*ent &efinitionL 7o en&-u$er$ /a2e reali$tic e5.ectation$L 7oe$ t/e $oftware tea* /a2e rig/t *i5 of $4ill$L

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

86

CS605 Software Engineering-II $ $ $

VU

9re .ro8ect re'uire*ent$ $tableL 7oe$ t/e .ro8ect tea* /a2e e5.erience wit/ t/e tec/nolog( to be i*.le*ente&L I$ t/e nu*ber of .eo.le on t/e .ro8ect tea* a&e'uate to &o t/e 8obL

4i%( co'*onent% and dri,er% Eac/ ri$4 /a$ *an( co*.onent$ an& force$ be/in& t/e*. =ro* t/i$ .er$.ecti2e% ri$4$ can be categori+e& into t/e following categorie$6 3erfor*ance ri$4$ + 7egree of uncertaint( t/at t/e .ro&uct will *eet it$ re'uire*ent$ an& be fit for it$ inten&e& u$e $ Co$t ri$4$ + T/e &egree of uncertaint( t/at t/e .ro8ect bu&get will be *aintaine& $ Su..ort ri$4$ + ,e$ultant $oftware will be ea$( to correct% en/ance% an& a&a.t $ Sc/e&ule ri$4$ + 3ro&uct $c/e&ule will be *aintaine& Eac/ ri$4 /a$ it$ own i*.act an& can be c/aracteri+e& a$ negligible% *arginal% critical% or cata$tro./ic. T/i$ i$ $u**ari+e& in t/e following table6 4i%( I'*act 1erfor'ance Su**ort Co%t Sc!edule $

Cata%tro*!ic Con$e'uence of =ailure to *eet t/e ,e$ult$ in increa$e& error re'uire*ent$ will re$ult in co$t an& $c/e&ule *i$$ion failure &ela($. E5.ecte& 2alue in e5ce$$ of S500I Con$e'uence of Significant Non)u&get 1nac/ie2able failure to &egra&ation re$.on$i2e or o2errun ac/ie2e &e$ire& un$u..ortable li4el( re$ult Critical Con$e'uence of ;oul& &egra&e .erfor*ance ,e$ult$ in o.erational error to a .oint w/ere *i$$ion &ela($ an& or increa$e& $ucce$$ i$ 'ue$tionable co$t wit/ e5.ecte& 2alue of S100I-S500I Con$e'uence of So*e #inor &ela($ 3o$$ible 3o$$ible failure to re&uction in o2errun $li..age ac/ie2e &e$ire& tec/nical re$ult .erfor*ance -arginal Con$e'uence of ,e$ult in &egra&ation of E5.ecte& 2alue ^S100I error $econ&ar( *i$$ion Con$e'uence of S*all ,e$.on$i2e Sufficient ,eali$tic failure to re&uction financial ac/ie2e &e$ire& re$ource$ re$ult Negligible Con$e'uence of Incon2enience #inor error

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

87

CS605 Software Engineering-II Con$e'uence of No re&uction Su..ortable )u&get ac/ie2able failure to un&er run ac/ie2e &e$ire& .o$$ible re$ult

VU

4i%( 1ro9ection ,i$4 .ro8ection i$ concerne& wit/ ri$4 e$ti*ation. It atte*.t$ to rate ri$4$ in two wa($6 li4eli/oo& an& con$e'uence$. T/ere are four ri$4 .ro8ect acti2itie$. T/e$e are6 K K K K E$tabli$/ a $cale t/at reflect$ t/e .ercei2e& li4eli/oo& of ri$4 7elineate t/e con$e'uence$ E$ti*ate i*.act Note t/e o2erall accurac( of ri$4 .ro8ection

T/i$ .roce$$ i$ e5e*.lifie& wit/ t/e /el. of t/e following table6 ,i$4 Si+e e$ti*ate *a( be $ignificantl( low Larger nu*ber of u$er$ t/an .lanne& Le$$ reu$e t/an .lanne& En&-u$er$ re$i$t $($te* 7eli2er( &ea&line will be tig/tene& =un&ing will be lo$t Cu$to*er will c/ange re'uire*ent$ Tec/nolog( will not *eet e5.ectation$ Lac4 of training on tool$ Staff ine5.erience& Staff turno2er will be /ig/ Categor( 3S 3S 3S )1 )1 C1 3S TE 7E ST ST 3robabilit( I*.act 60B 2 30B 3 !0B 2 40B 3 50B 2 40B 1 0B 2 30B 1 0B 3 30B 2 60B 2 ,###

;/ere i*.act$ are co&ifie& a$ follow$6 16 cata$tro./ic 26 critical 36 *arginal

46 negligible

an& ,### $tan&$ for ri$4 *itigation% *onitoring% an& *anage*ent .lan.

Lecture No. 00 #%%e%%ing 4i%( I'*act


9$$e$$*ent of ri$4 i*.act i$ a non-tri2ial .roce$$. =actor$ affecting t/e con$e'uence$ are t/e nature% $co.e% an& ti*ing.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

88

CS605 Software Engineering-II =or eac/ ri$4 an e5.o$ure i$ calculate& a$ follow$6 ,E Z 3robabilit( of t/e ri$4 5 Co$t T/i$ ri$4 e5.o$ure i$ t/en u$e& to i&entif( t/e to. ri$4$ an& *itigation $trategie$. 9$ an e5a*.le% let u$ con$i&er t/e following ca$e6 $

VU

$ $

,i$46 + Anl( !0B of t/e $oftware co*.onent$ $c/e&ule& for reu$e will% in fact% be integrate& into t/e a..lication. T/e re*aining functionalit( will /a2e to be cu$to* &e2elo.e&. ,i$4 3robabilit( F 0B li4el( Hi.e. 0. J ,i$4 i*.act + 60 reu$able $oftware co*.onent$ were .lanne&. If onl( !0B can be u$e&% 1 co*.onent$ woul& /a2e to be &e2elo.e& fro* $cratc/. Since t/e a2erage co*.onent will co$t 100%000% t/e total co$t will be 1% 00%000. T/erefore% ,E Z 0. T 1% 00%000 Z 1%440%000

9 /ig/ le2el ri$4 *a( be refine& into finer granularit( to /an&le it efficientl(. 9$ an e5a*.le% t/e abo2e *entione& ri$4 i$ refine& a$ follow$6 1. Certain reu$able co*.onent$ were &e2elo.e& b( 3r& .art( wit/ no 4nowle&ge of internal &e$ign $tan&ar&. 2. 7e$ign $tan&ar& for co*.onent interface$ /a$ not been $oli&ifie& an& *a( not confor* to certain e5i$ting co*.onent$. 3. Certain reu$able co*.onent$ /a2e been i*.le*ente& in a language t/at i$ not $u..orte& on t/e target en2iron*ent. ;e can now ta4e t/e following *ea$ure$ to *itigate an& *onitor t/e ri$46 1. Contact 3r& .art( to &eter*ine confor*ance wit/ &e$ign $tan&ar&$. 2. 3re$$ for interface $tan&ar& co*.letionC con$i&er co*.onent $tructure w/en &eci&ing on interface .rotocol. 3. C/ec4 to &eter*ine if language $u..ort can be ac'uire&. T/i$ lea&$ u$ to t/e following #anage*entOContingenc( 3lan6 1. ,E co*.ute& to 1%440%000. 9llocate t/i$ a*ount wit/in .ro8ect contingenc( co$t. 2. 7e2elo. re2i$e& $c/e&ule a$$u*ing 1 a&&itional co*.onent$ will /a2e to be cu$to*-built 3. 9llocate $taff accor&ingl( 4i%( -itigationD -onitoringD and -anage'ent 64---7 T/e ,### .lan a$$i$t$ t/e .ro8ect tea* in &e2elo.ing $trateg( for &ealing wit/ ri$4. In t/i$ conte5t% an effecti2e $trateg( *u$t con$i&er6 + ,i$4 a2oi&ance + ,i$4 *onitoring + ,i$4 *anage*ent an& contingenc( .lan

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

89

CS605 Software Engineering-II

VU

It *u$t alwa($ be re*e*bere& t/at a2oi&ance i$ alwa($ t/e be$t $trateg(. 9$ an e5a*.le% let con$i&er t/e following $cenario. In t/i$ ca$e /ig/ turn-o2er /a$ been i&entifie& a$ a ri$4 wit/ t/e following c/aracteri$tic$6 $ $ $ ,i$4 r8 - >ig/ turno2er Li4eli/oo& l8 Z 0.! I*.act 58 - .ro8ecte& at le2el 2 HcriticalJ

Let u$ now &e2i$e a *itigation $trateg( for re&ucing turno2er. In or&er to &o $o% t/e following $te.$ *a( be ta4en6 $ $ $ $ $ $ $ #eet wit/ current $taff to &eter*ine cau$e$ for turno2er He.g. .oor wor4ing con&ition$% low .a(% co*.etiti2e 8ob *ar4etJ #itigate t/o$e cau$e$ t/at are un&er our control before t/e .ro8ect $tart$ Ance t/e .ro8ect co**ence$% a$$u*e turno2er will occur an& &e2elo. tec/ni'ue$ to en$ure continuit( w/en .eo.le lea2e Argani+e .ro8ect tea*$ $o t/at infor*ation about eac/ &e2elo.*ent acti2it( i$ wi&el( &i$.er$e& 7efine &ocu*entation $tan&ar&$ an& e$tabli$/ *ec/ani$*$ to be $ure t/at &ocu*ent$ are &e2elo.e& in a ti*el( *anner Hto en$ure continuit(J Con&uct .eer re2iew$ of all wor4 H$o t/at *ore t/an one .er$on i$ u. to $.ee&J 9$$ign a bac4u. $taff *e*ber for e2er( critical tec/nolog(

Ance t/e $trateg( /a$ been &e2i$e&% t/e .ro8ect *u$t be *onitore& for t/i$ .articular ri$4. T/at i$% we *u$t 4ee. an e(e on t/e 2ariou$ factor$ t/at can in&icate t/at t/i$ .articular ri$4 i$ about to /a..en. In t/i$ ca$e% t/e factor$ coul& be6 $ $ $ $ $ General attitu&e of tea* *e*ber$ ba$e& on .ro8ect .re$$ure$ T/e &egree to w/ic/ t/e tea* i$ 8elle& Inter.er$onal relation$/i.$ a*ong tea* *e*ber$ 3otential .roble*$ wit/ co*.en$ation an& benefit$ T/e a2ailabilit( of 8ob$ wit/in t/e co*.an( an& out$i&e it

9l$o% t/e effecti2ene$$ of t/e ri$4 *itigation $te.$ $/oul& be *onitore&. So% in t/i$ e5a*.le% t/e 3# $/oul& *onitor &ocu*ent$ carefull( to en$ure t/at eac/ can $tan& on it$ own an& t/at eac/ i*.art$ infor*ation t/at woul& be nece$$ar( if a newco*er were force& to 8oin t/e $oftware tea* $o*ew/ere in t/e *i&&le of t/e .ro8ect. 4i%( -anage'ent and Contingenc2 1lan ,i$4 *anage*ent an& contingenc( .lanning a$$u*e$ t/at *itigation effort$ /a2e faile& an& t/at t/e ri$4 /a$ beco*e a realit(. $ $ $ $ ,i$4 /a$ beco*e a realit( F $o*e .eo.le announce t/at t/e( will be lea2ing If *itigation $trateg( /a$ been followe&% bac4u. i$ a2ailable% infor*ation /a$ been &ocu*ente&% an& 4nowle&ge /a$ been &i$.er$e& Te*.oraril( refocu$ an& rea&8u$t re$ource$ 3eo.le w/o are lea2ing are a$4e& to $to. all wor4 an& en$ure 4nowle&ge tran$fer

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

90

CS605 Software Engineering-II

VU

,i$4 *itigation an& contingenc( i$ a co$tl( bu$ine$$. It i$ t/erefore i*.ortant to un&er$tan& t/at for ,### .lan% a co$tObenefit anal($i$ of eac/ ri$4 *u$t be carrie& out. T/e 3areto .rinci.le H 0-20 ruleJ i$ a..licable in t/i$ ca$e a$ well F 20B of t/e i&entifie& ri$4 account for 0B of t/e .otential for .ro8ect failure.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

91

CS605 Software Engineering-II

VU

Lecture No. 01 Software 1ro9ect Sc!eduling and -onitoring


Software .ro8ect $c/e&uling i$ t/e ne5t ta$4 to be .erfor*e& b( t/e 3#. It i$ i*.ortant to note once again t/at in t/e rea$on$ for .ro8ect failure% unreali$tic &ea&line an& un&ere$ti*ate of effort in2ol2e& in t/e .ro8ect are two of t/e *o$t i*.ortant rea$on$ for .ro8ect failure. T/erefore% a goo& $c/e&ule e$ti*ate woul& increa$e t/e c/ance$ of t/e $ucce$$ of t/e .ro8ect. In t/i$ conte5t% a 3# /a$ to fir$t co*e u. wit/ t/e $c/e&ule an& t/en *onitor t/e .rogre$$ of t/e .ro8ect to en$ure t/at t/ing$ are /a..ening accor&ing to t/e $c/e&ule. It woul& not be out of .lace to 'uote =re& )roo4$ at t/i$ .oint. >e $a($% 5*ro!ects fall behind schedule one day at a time.6 T/at *ean$ a &ela( of a wee4 or a *ont/ or a (ear &oe$ not /a..en $u&&enl( F it /a..en$ one &a( at a ti*e. T/erefore% a .ro8ect *anager /a$ to be 2igilant to en$ure t/at t/e .ro8ect &oe$ not fall be/in& $c/e&ule. T/e realit( of a tec/nical .ro8ect i$ t/at /un&re&$ of $*all ta$4$ *u$t occur to acco*.li$/ a large goal. T/erefore t/e 3ro8ect *anager:$ ob8ecti2e$ inclu&e6 + + + + I&entification an& &efinition all .ro8ect ta$4$ )uil&ing a networ4 t/at &e.ict$ t/eir inter&e.en&encie$ I&entification of t/e ta$4$ t/at are critical wit/in t/e networ4 Trac4ing t/eir .rogre$$ to en$ure &ela( i$ recogni+e& one &a( at a ti*e

=or t/i$% t/e $c/e&ule *u$t be fine graine&. Software 1ro9ect Sc!eduling Software .ro8ect $c/e&uling i$ an acti2it( t/at &i$tribute$ e$ti*ate& effort acro$$ t/e .lanne& .ro8ect &uration b( allocating t/e effort to $.ecific $oftware engineering ta$4$. It i$ i*.ortant to note t/at t/e $c/e&ule e2ol2e$ o2er ti*e. 7uring earl( $tage$ of .ro8ect .lanning% a *acro$co.ic $c/e&ule i$ &e2elo.e&. T/i$ t(.e of $c/e&ule i&entifie$ all *a8or SE acti2itie$ an& t/e .ro&uct function$ to w/ic/ t/e( are a..lie&. 9$ t/e .ro8ect get$ un&erwa( t/e$e ta$4$ are refine& into a &etaile& $c/e&ule. In or&er to co*e u. wit/ a reali$tic $c/e&ule% t/e following ba$ic .rinci.le$ are u$e&6 K Co*.art*entali+ation T/e .ro8ect *u$t be co*.art*entali+e& into a nu*ber of *anageable acti2itie$ an& ta$4$. To acco*.li$/ co*.art*entali+ation% bot/ t/e .ro&uct an& .roce$$ are &eco*.o$e&. K Inter&e.en&enc( T/e inter&e.en&enc( of eac/ co*.art*entali+e& acti2it( or ta$4 *u$t be &eter*ine&. So*e ta$4$ *u$t occur in $e'uence w/ile ot/er$ can occur in .arallel. So*e acti2itie$ cannot co**ence until t/e wor4 .ro&uct .ro&uce& b( anot/er i$ a2ailable.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

92

CS605 Software Engineering-II

VU

K Ti*e allocation Eac/ ta$4 to be $c/e&ule& *u$t be allocate& $o*e nu*ber of wor4 unit$ He.g. .er$on-&a($ of effortJ. In a&&ition% eac/ ta$4 *u$t be a$$igne& a $tart &ate an& an en& &ate w/ic/ i$ a function of t/e inter&e.en&encie$ an& nu*ber of re$ource$. K Effort 2ali&ation E2er( .ro8ect /a$ a &efine& nu*ber of $taff *e*ber$. 9$ ti*e allocation occur$% t/e .ro8ect *anager *u$t en$ure t/at no *ore t/an t/e allocate& nu*ber of .eo.le /a$ been $c/e&ule& at an( gi2en ti*e. K 7efine& re$.on$ibilitie$ E2er( ta$4 $/oul& be a$$igne& to a $.ecific tea* *e*ber. K 7efine& outco*e$ E2er( ta$4 $/oul& /a2e a &efine& outco*e% nor*all( a wor4 .ro&uct. K 7efine& *ile$tone$ E2er( ta$4 or grou. of ta$4$ $/oul& be a$$ociate& wit/ a .ro8ect *ile$tone. Software 1ro9ect Sc!eduling and -onitoring Software .ro8ect $c/e&uling i$ t/e ne5t ta$4 to be .erfor*e& b( t/e 3#. It i$ i*.ortant to note once again t/at in t/e rea$on$ for .ro8ect failure% unreali$tic &ea&line an& un&ere$ti*ate of effort in2ol2e& in t/e .ro8ect are two of t/e *o$t i*.ortant rea$on$ for .ro8ect failure. T/erefore% a goo& $c/e&ule e$ti*ate woul& increa$e t/e c/ance$ of t/e $ucce$$ of t/e .ro8ect. In t/i$ conte5t% a 3# /a$ to fir$t co*e u. wit/ t/e $c/e&ule an& t/en *onitor t/e .rogre$$ of t/e .ro8ect to en$ure t/at t/ing$ are /a..ening accor&ing to t/e $c/e&ule. It woul& not be out of .lace to 'uote =re& )roo4$ at t/i$ .oint. >e $a($% 5*ro!ects fall behind schedule one day at a time.6 T/at *ean$ a &ela( of a wee4 or a *ont/ or a (ear &oe$ not /a..en $u&&enl( F it /a..en$ one &a( at a ti*e. T/erefore% a .ro8ect *anager /a$ to be 2igilant to en$ure t/at t/e .ro8ect &oe$ not fall be/in& $c/e&ule. T/e realit( of a tec/nical .ro8ect i$ t/at /un&re&$ of $*all ta$4$ *u$t occur to acco*.li$/ a large goal. T/erefore t/e 3ro8ect *anager:$ ob8ecti2e$ inclu&e6 + + + + I&entification an& &efinition all .ro8ect ta$4$ )uil&ing a networ4 t/at &e.ict$ t/eir inter&e.en&encie$ I&entification of t/e ta$4$ t/at are critical wit/in t/e networ4 Trac4ing t/eir .rogre$$ to en$ure &ela( i$ recogni+e& one &a( at a ti*e

=or t/i$% t/e $c/e&ule *u$t be fine graine&. Software 1ro9ect Sc!eduling Software .ro8ect $c/e&uling i$ an acti2it( t/at &i$tribute$ e$ti*ate& effort acro$$ t/e .lanne& .ro8ect &uration b( allocating t/e effort to $.ecific $oftware engineering ta$4$. It i$ i*.ortant to note t/at t/e $c/e&ule e2ol2e$ o2er ti*e. 7uring earl( $tage$ of .ro8ect .lanning% a *acro$co.ic $c/e&ule i$ &e2elo.e&. T/i$ t(.e of $c/e&ule i&entifie$ all *a8or

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

93

CS605 Software Engineering-II

VU

SE acti2itie$ an& t/e .ro&uct function$ to w/ic/ t/e( are a..lie&. 9$ t/e .ro8ect get$ un&erwa( t/e$e ta$4$ are refine& into a &etaile& $c/e&ule. In or&er to co*e u. wit/ a reali$tic $c/e&ule% t/e following ba$ic .rinci.le$ are u$e&6 K Co*.art*entali+ation T/e .ro8ect *u$t be co*.art*entali+e& into a nu*ber of *anageable acti2itie$ an& ta$4$. To acco*.li$/ co*.art*entali+ation% bot/ t/e .ro&uct an& .roce$$ are &eco*.o$e&. K Inter&e.en&enc( T/e inter&e.en&enc( of eac/ co*.art*entali+e& acti2it( or ta$4 *u$t be &eter*ine&. So*e ta$4$ *u$t occur in $e'uence w/ile ot/er$ can occur in .arallel. So*e acti2itie$ cannot co**ence until t/e wor4 .ro&uct .ro&uce& b( anot/er i$ a2ailable. K Ti*e allocation Eac/ ta$4 to be $c/e&ule& *u$t be allocate& $o*e nu*ber of wor4 unit$ He.g. .er$on-&a($ of effortJ. In a&&ition% eac/ ta$4 *u$t be a$$igne& a $tart &ate an& an en& &ate w/ic/ are a function of t/e inter&e.en&encie$ an& nu*ber of re$ource$. K Effort 2ali&ation E2er( .ro8ect /a$ a &efine& nu*ber of $taff *e*ber$. 9$ ti*e allocation occur$% t/e .ro8ect *anager *u$t en$ure t/at no *ore t/an t/e allocate& nu*ber of .eo.le /a2e been $c/e&ule& at an( gi2en ti*e. K 7efine& re$.on$ibilitie$ E2er( ta$4 $/oul& be a$$igne& to a $.ecific tea* *e*ber. K 7efine& outco*e$ E2er( ta$4 $/oul& /a2e a &efine& outco*e% nor*all( a wor4 .ro&uct. K 7efine& *ile$tone$ E2er( ta$4 or grou. of ta$4$ $/oul& be a$$ociate& wit/ a .ro8ect *ile$tone.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

94

CS605 Software Engineering-II

VU

Lecture No. 00 4elation%!i* between *eo*le and effort


T/e relation$/i. between t/e nu*ber of .eo.le an& ti*e to &e2elo. an a..lication i$ not linear. It i$ not a$ $i*.le a$ a 120 *an-&a( .ro8ect can be &e2elo.e& b( 1 .er$on wor4ing for 120 &a($ or 120 .eo.le wor4ing for 1 &a(. T/e co**unication an& coor&ination o2er/ea& .la($ a 2er( $ignificant role. 9$ can be recalle& fro* our earlier &i$cu$$ion$% total nu*ber of C/annel$ of co**unication in2ol2ing N .eo.le i$ gi2en b( t/e following for*ula. C Z NHN-1JO2 Now% if t/e co**unication o2er/ea& .er c/annel i$ 4% t/en wor4 acco*.li$/e& i$ gi2en b(6 ; Z H1-4JC 5 N T/i$ ./eno*enon i$ &e.icte& in t/e following &iagra*6

It *a( be note& /ere t/at wit/ onl( a 5B co**unication o2er/ea& .er c/annel% t/e total wor4 acco*.li$/e& b( a tea* of 6 .eo.le woul& be le$$ t/an t/e 2olu*e of wor4 co*.lete& b( a tea* of 4 .eo.le. It i$ al$o intere$ting to note t/at it a..roac/e$ 0 a$ t/e tea* $i+e a..roac/e$ 20. Ta%( Set +efinition 9 .roce$$ *o&el &efine$ a ta$4 $et w/ic/ co*.ri$e$ of SE wor4 ta$4$% *ile$tone$% an& &eli2erable$. T/i$ enable a $oftware tea* to &efine% &e2elo.% an& $u..ort t/e $oftware. T/erefore% eac/ $oftware .roce$$ $/oul& &efine a collection of ta$4 $et$% &e$igne& to *eet t/e nee&$ of &ifferent t(.e$ of .ro8ect$. To &eter*ine t/e $et of ta$4$ to be .erfor*e& t/e t(.e of t/e .ro8ect an& t/e &egree of rigor re'uire& nee&$ to be e$tabli$/e&. 7ifferent

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

95

CS605 Software Engineering-II

VU

t(.e$ of .ro8ect$ an& &ifferent &egree of rigor. T/e$e .ro8ect$ coul& fall into t/e following categorie$6 $ $ $ $ $ Conce.t &e2elo.*ent .ro8ect$ New a..lication &e2elo.*ent 9..lication en/ance*ent 9..lication *aintenance ,eengineering .ro8ect$

T/e &egree of rigor can al$o be categori+e& a$ Ca$ual% Structure&% Strict% or @uic4 ,eaction. T/e following .aragra./$ elaborate eac/ one of t/e$e. $ Ca$ual 9ll .roce$$ fra*ewor4 acti2itie$ are a..lie&% but onl( a *ini*u* ta$4 $et i$ re'uire&. It re'uire$ re&uce& u*brella ta$4$ an& re&uce& &ocu*entation. )a$ic .rinci.le$ of SE are /owe2er $till followe&. Structure& In t/i$ ca$e a co*.lete .roce$$ fra*ewor4 i$ a..lie&. 9..ro.riate fra*ewor4 acti2itie$% relate& ta$4$% an& u*brella acti2itie$ Hto en$ure /ig/ 'ualit(J are al$o a..lie&. S@9% SC#% &ocu*entation% an& *ea$ure*ent are con&ucte& in $trea*line& *anner. Strict In t/i$ ca$e a full .roce$$ i$ i*.le*ente& an& all u*brella acti2itie$ are a..lie&. T/e wor4 .ro&uct$ generate& in t/i$ ca$e are robu$t. @uic4 ,eaction T/i$ a..roac/ i$ ta4en in ca$e of an e*ergenc(. In t/i$ ca$e onl( ta$4 e$$ential for *aintaining goo& 'ualit( are a..lie&. 9fter t/e ta$4 /a$ been acco*.li$/e&% &ocu*ent$ are u.&ate& b( bac4-filling.

$ $

T/e ne5t 'ue$tion i$ /ow to &eci&e about t/e &egree of rigor. =or t/i$ .ur.o$e an a&a.tation criterion /a$ been &e2elo.e&. T/e following .ara*eter$ are con$i&ere& before a &eci$ion i$ *a&e6 $ Si+e of t/e .ro8ect $ Nu*ber of .otential u$er$ $ #i$$ion criticalit( $ 9..lication longe2it( $ Stabilit( of re'uire*ent$ $ Ea$e of cu$to*erO&e2elo.er co**unication $ Si+e of t/e .ro8ect $ Nu*ber of .otential u$er$ $ #i$$ion criticalit( $ 9..lication longe2it( $ Stabilit( of re'uire*ent$ $ Ea$e of cu$to*erO&e2elo.er co**unication T/e$e .ara*eter$ are u$e& to calculate w/at i$ 4nown a$ Ta%( Set Selector 6TSS7 w/ic/ i$ t/en u$e& to &eter*ine t/e &egree of rigor. It i$ co*.ute& a$ follow$6

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

96

CS605 Software Engineering-II

VU

Eac/ a&a.tation criteria i$ a$$igne& a gra&e% weig/t% an& entr( .oint *ulti.lier. 1. 9 gra&e 2alue of between 1 an& 5 i$ a$$igne& to eac/ a&a.tation criteria a$ a..ro.riate. 2. T/e &efault 2alue of t/e weig/ting factor Ha$ gi2en in t/e table belowJ i$ re2iewe& an& *o&if( if nee&e&. T/e range$ $/oul& be between 0. to 1.2.
9&a.tation Criteria Si+e of .ro&uct Nu*ber of 1$er$ )u$ine$$ Criticalit( Longe2it( Stabilit( of re'uire*ent$ Ea$e of co**unication #aturit( of tec/nolog( 3erfor*ance Con$traint$ E*be&&e& O non-e*be&&e& 3ro8ect Staffing Intero.erabilit( ,eengineering factor$ Gra&e ;eig/t Entr( 3oint #ulti.lier Conc. New En/an. #aint. ,eeng. 7e2. 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 1 1 3ro&uct

1.2 1.1 1.1 0." 1.2 0." 0." 0. 1.2 1.0 1.1 1.2

Ta$4 $et $elector

3. #ulti.l( t/e gra&e entere& b( t/e weig/t an& b( entr( .oint *ulti.lier for t/e t(.e of .ro8ect un&erta4en. T/e entr( .oint *ulti.lier ta4e$ a 2alue of 0 or 1 an& in&icate$ t/e rele2ance of t/e a&a.tation criterion to t/e .ro8ect t(.e. 3ro&uct Z gra&e _ weig/t _ entr( .oint *ulti.lier T/e TSS i$ t/en co*.ute& a$ t/e a2erage of all t/e entrie$ in t/e .ro&uct colu*n. It i$ t/en u$e& to &eter*ine t/e &egree of rigor re'uire& a$ $/own in t/e table below. TSS ^ 1.2 1.0 F 3.0 ` 2.4 +egree of 4igor Ca$ual Structure& Strict

It *a( be note& t/at t/ere i$ o2erla. in TSS 2alue$. T/i$ o2erla. i$ intentional an& it &e.ict$ t/at $/ar. boun&arie$ are i*.o$$ible to &efine w/en *a4ing ta$4 $et $election. In t/e final anal($i$% t/e TSS 2alue% .a$t e5.erience% an& co**on $en$e *u$t all be factore& into t/e c/oice of t/e ta$4 $et for a .ro8ect.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

97

CS605 Software Engineering-II

VU

T/i$ conce.t i$ &e*on$trate& wit/ t/e /el. of following e5a*.le. In t/i$ ca$e TSS 2alue i$ co*.ute& for a new &e2elo.*ent .ro8ect. 9&a.tation Criteria Si+e of .ro&uct Nu*ber of 1$er$ )u$ine$$ Criticalit( Longe2it( Stabilit( of re'uire*ent$ Ea$e of co**unication #aturit( of tec/nolog( 3erfor*ance Con$traint$ E*be&&e& O non-e*be&&e& 3ro8ect Staffing Intero.erabilit( ,eengineering factor$ TSS Gra&e 2 3 4 3 2 2 2 3 3 2 4 0 ;eig/t 1.2 1.1 1.1 0." 1.2 0." 0." 0. 1.2 1.0 1.1 1.2 Entr( .oint *ulti.lier New 7e2elo.*ent 1 1 1 1 1 1 1 1 1 1 1 0 3ro&uct 2.4 3.3 4.4 2.! 2.4 1. 1. 2.4 3.6 2.0 4.4 0 2.6

Since t/e 2alue of TSS i$ 2.6% t/e &egree of rigor coul& be $tructure& or $trict. T/e .ro8ect *anager now nee&$ to u$e /i$ e5.erience to &eter*ine w/ic/ of t/e two a..roac/e$ $/oul& be ta4en. TSS ^ 1.2 1.0 F 3.0 ` 2.4 +egree of 4igor Ca$ual Structure& Strict

E)a'*le E SE Ta%(% for a Conce*t +e,elo*'ent 1ro9ect

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

98

CS605 Software Engineering-II

VU

Lecture No. 03 Ta%( Networ(


Let u$ now a..l( t/e .rinci.le$ $tu&ie& abo2e to &e2elo. a .lan for a conce.t &e2elo.*ent .ro8ect. In t/i$ ca$e t/e .otential for new tec/nolog( or new bu$ine$$ i&ea i$ e5.lore&. Since it i$ a conce.t &e2elo.*ent .ro8ect% t/e a..licabilit( i$ not certain but it a..ear$ to be u$eful an& /ence nee&$ to be e5.lore&. #a8or ta$4$ inclu&e6 $ $ $ $ $ $ Conce.t $co.ing 3reli*inar( conce.t .lanning Tec/nolog( ri$4 a$$e$$*ent 3roof of conce.t Conce.t i*.le*entation Cu$to*er reaction to conce.t

+efining a Ta%( Networ( Ance t/e ta$4$ /a2e been i&entifie&% we nee& to &e2elo. a ta$4 networ4 to &eter*ine t/e $e'uence in w/ic/ t/e$e acti2itie$ nee& to be .erfor*e&. T/i$ will ulti*atel( lea& to t/e ti*e re'uire& to co*.lete t/e .ro8ect Hto be &i$cu$$e& laterJ. T/e following &iagra* $/ow$ t/e ta$4 networ4 for t/e abo2e .ro8ect.

1.1 Conce.t $co.ing

1.3a Tec/. ri$4 a$$e$$*ent

1.5a Conce.t I*.le*ent.

1.2 Conce.t 3lanning

1.3b Tec/. ri$4 a$$e$$*ent

1.4 3roof of Conce.t

1.5b Conce.t I*.le*ent.

1.6 Integrate

1.3c Tec/. ri$4 a$$e$$*ent

1.5c Conce.t I*.le*ent.

1.! Cu$to*er reaction

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

99

CS605 Software Engineering-II

VU

Lecture No. 05 Sc!eduling


Ance we /a2e t/e ta$4 networ4% we are now rea&( to .re.are a $c/e&ule for t/e .ro8ect. =or t/i$ we u$e two tec/ni'ue$ 4nown a$6 $ $ 3rogra* e2aluation an& re2iew tec/ni'ue$ H3E,TJ Critical 3at/ #et/o& HC3#J

T/e$e are 'uantitati2e tool$ t/at allow t/e $oftware .lanner to &eter*ine t/e critical .at/ F t/e c/ain of ta$4$ t/at &eter*ine$ t/e &uration of t/e .ro8ect an& e$tabli$/ *o$t li4el( ti*e e$ti*ate$ for in&i2i&ual ta$4$ b( a..l(ing $tati$tical *o&el$. T/e( al$o /el. t/e .lanner to calculate boun&ar( ti*e$ t/at &efine a ti*e win&ow for a .articular ta$4. T/e boun&ar( ti*e &efine$ t/e following .ara*eter$ for a .ro8ect6 $ $ $ $ $ T/e earlie$t ti*e t/at a ta$4 can begin w/en all .rece&ing ta$4$ are co*.lete& in t/e $/orte$t .o$$ible ti*e T/e late$t ti*e for ta$4 initiation before t/e *ini*u* .ro8ect co*.letion ti*e i$ &ela(e& T/e earlie$t fini$/ T/e late$t fini$/ T/e total float F t/e a*ount of $ur.lu$ ti*e or leewa( allowe& in $c/e&uling ta$4$ $o t/at t/e networ4 critical .at/ i$ *aintaine& on $c/e&ule

In or&er to u$e t/e 3E,T an& C3#% t/e following i$ re'uire&6 $ 9 &eco*.o$ition of .ro&uct function $ 9 $election of a..ro.riate .roce$$ *o&el an& ta$4 $et $ 7eco*.o$ition of ta$4$ F al$o 4nown a$ t/e wor4 brea4&own $tructure H;)SJ $ E$ti*ation of effort $ Inter&e.en&encie$ Ti'eline C!art To &e2elo. t/e $c/e&ule for a .ro8ect% ti*e re'uire& for eac/ acti2it( in t/e Ta$4 Networ4 i$ e$ti*ate&. T/i$ anal($i$ an& &eco*.o$ition lea&$ to t/e &e2elo.*ent of a Ti*eline or Gantt C/art for t/e .ro8ect w/ic/ .ortra($ t/e $c/e&ule for t/e .ro8ect. 9$ an e5a*.le% let u$ a$$u*e t/at Conce.t Sco.ing Ht/e fir$t ta$4 in t/e abo2e li$tJ i$ furt/er $ub&i2i&e& into t/e following $ub-ta$4$ wit/ t/e a$$ociate& e$ti*ate& ti*e re'uire*ent$6 1. 2. 3. 4. 5. 6. !. I&entification of nee&$ an& benefit$ H3 &a($J 7efinition of &e$ire& out.utOcontrolOin.ut H! &a($J 7efinition of t/e functionObe/a2iour H6 &a($J I$olation of $oftware ele*ent$ H1 &a(J ,e$earc/ing a2ailabilit( of e5i$ting $oftware H2 &a($J 7efinition tec/nical fea$ibilit( H4 &a($J #a4ing 'uic4 e$ti*ate of $i+e H1 &a(J

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

100

CS605 Software Engineering-II . Creating $co.e &efinition H2 &a($J

VU

;e al$o a$$u*e t/at t/e following ta$4 networ4 for t/i$ wa$ &e2elo.e&.
1.1.4 I$olation of $oftware ele*ent$

1.1.1 I&entification of nee&$ an& benefit$

1.1.2 7efinition of &e$ire& out.utOcontrolOin .ut

1.1.3 7efinition of t/e functionObe/a2io ur

1.1.5 ,e$earc/ing a2ailabilit( of e5i$ting $oftware

1.1.! #a4ing 'uic4 e$ti*ate of $i+e

1.1.6 7efinition tec/nical fea$ibilit(

1.1. Creating $co.e &efinition

T/i$ i$ now con2erte& in t/e following $c/e&ule in t/e for* of a Gantt C/art. Note t/at% t/e conce.t of boun&ar( ti*e allow$ u$ to $c/e&ule Ta$4 Nu*ber$ 1.1.4 an& 1.1.5 an(w/ere along Ta$4 Nu*ber 1.1.3. T/e actual ti*e i$ &eter*ine& b( t/e .ro8ect *anager i$ ba$e& u.on t/e a2ailabilit( of re$ource$ an& ot/er con$traint$. Eac/ ta$4 i$ furt/er $ub&i2i&e& in $ub-ta$4$ in t/e $a*e *anner until t/e $c/e&ule for t/e co*.lete .ro8ect i$ &eter*ine&.

Trac(ing a Sc!edule

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

101

CS605 Software Engineering-II

VU

Lecture No. 05 1ro9ect Trac(ing


9 $c/e&ule i$ *eaningle$$ if it i$ not followe& an& trac4e&. Ta$4$ an& *ile$tone$ &efine& in a .ro8ect $c/e&ule *u$t be trac4e& an& controlle& a$ .ro8ect .rocee&$. Trac4ing *et/o&$ inclu&e6 $ $ $ $ $ $ $ 3erio&ic .ro8ect $tatu$ *eeting$ E2aluating t/e re$ult$ of all re2iew$ 7eter*ine w/et/er .ro8ect *ile$tone$ /a2e been acco*.li$/e& b( t/e $c/e&ule& &ate Co*.aring actual $tart &ate to .lanne& $tart &ate Infor*al *eeting$ wit/ t/e .ractitioner$ 1$ing earne& 2alue anal($i$ Error trac4ing

T/e la$t two tec/ni'ue$ are &i$cu$$e& in furt/er &etail in t/e following .aragra./$6 Earned Value #nal2%i% Earne& 0alue 9nal($i$ or E09 i$ a 'uantitati2e tec/ni'ue for a$$e$$ing t/e .rogre$$ of a .ro8ect. T/e earne& 2alue $($te* .ro2i&e$ a co**on 2alue $cale for e2er( $oftware ta$4% regar&le$$ of t/e t(.e of wor4 being .erfor*e&. T/e total /our$ to &o t/e w/ole .ro8ect are e$ti*ate&% an& e2er( ta$4 i$ gi2en an earne& 2alue ba$e& on t/e e$ti*ate& .ercentage of t/e total. In or&er to &o t/e E09% t/e bu&gete& co$t of wor4 $c/e&ule H)C;SJ i$ &eter*ine& a$ follow$6 Let )C;Si Z effort H.er$on-&a($ etcJ for ta$4i )C;S i$ t/en t/e 3rogre$$ $o far F a&& all )C;Si $o far. Now )9C Z bu&get at co*.letion Z [ )C;Si Now if )C;3 i$ t/e )u&gete& Co$t of ;or4 3erfor*% t/en Sc/e&ule .erfor*ance in&e5 Sc/e&ule 2ariance S3I Z )C;3O)C;S S0 Z )C;3 F )C;S

S3I clo$e to 1 in&icate$ efficient e5ecution. Si*ilarl( 3ercent $c/e&ule& for co*.letion Z )C;SO)9C 3ercent co*.lete Z )C;3O)9C 9ctual co$t wor4 .erfor*e& 9C;3 Co$t .erfor*ance in&e5 C3I Z )C;3O9C;3 Co$t 2ariance C0 Z )C;3 F 9C;3 Now% 2alue of C3I clo$e to 1 *ean$ .ro8ect i$ wit/in it$ &efine& bu&get. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

102

CS605 Software Engineering-II

VU

T/erefore% b( u$ing S3I an& C3I we e$ti*ate /ow t/e .ro8ect i$ .rogre$$ing. If we /a2e t/e$e 2alue$ clo$e to 1% it *ean$ t/at we /a2e /a& goo& e$ti*ate$ an& t/e .ro8ect i$ un&er control.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

103

CS605 Software Engineering-II

VU

Lecture No. 06 Error Trac(ing


Error trac4ing can al$o be u$e& to e$ti*ate t/e .rogre$$ of t/e .ro8ect. In t/i$ ca$e we trac4 error$ in wor4 .ro&uct$ Hre'uire*ent $.ecification$% &e$ign &ocu*ent$% $ource co&e etcJ to a$$e$$ t/e $tatu$ of a .ro8ect. T/e .roce$$ wor4$ a$ follow$6 ;e collect error relate& *etric$ o2er *an( .ro8ect$ an& &eter*ine our &efect re*o2al efficienc( in t/e following *anner6 7efect re*o2al efficienc(% 7,E Z E O HEP7J% w/ere $ E F error$ foun& before $/i.*ent $ 7 F error$ foun& &uring o.eration It .ro2i&e$ a $trong in&ication of t/e effecti2ene$$ of t/e 'ualit( a$$urance acti2itie$. Now let u$ a$$u*e t/at we /a2e collecte& t/e following error$ an& &efect &ata o2er t/e la$t 24 *ont/$6 $ $ $ $ $ $ Error$ .er re'uire*ent $.ecification .age F Ere' Error .er co*.onent F &e$ign le2el F E&e$ign Error$ .er co*.onent F co&e le2el F Eco&e 7,E F re'uire*ent anal($i$ 7,E F arc/itectural &e$ign 7,E F co&ing

;e now recor& t/e nu*ber of error$ foun& &uring eac/ SE $te. an& calculate current 2alue$ for Ere'% E&e$ign% an& Eco&e. T/e$e 2alue$ are t/en co*.are& to a2erage$ of .a$t .ro8ect$. If t/e current re$ult$ 2ar( *ore t/an 20B fro* a2erage% t/ere *a( be cau$e for concern an& t/ere i$ certainl( cau$e for in2e$tigation. E)a'*le $ $ Ere' for t/e current .ro8ect Z 2.1 Argani+ational a2erage Z 3.6 + Two .o$$ibilitie$ $ T/e tea* /a$ &one an out$tan&ing 8ob $ T/e tea* /a$ been la5 in it$ re2iew a..roac/ + If t/e $econ& $cenario a..ear$ li4el( $ )uil& a&&itional &e$ign ti*e be u$e& to better target re2iew an&Oor te$ting re$ource$ in t/e following 120 co*.onent$ 32 e5/ibit E&e$ign ` 1.2 a2erage 9&8u$t co&e re2iew re$ource$ accor&ingl(

T/i$ can al$o *anner6 + + + Ti'e "o)ing

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

104

CS605 Software Engineering-II

VU

Ti*e-bo5ing i$ u$e& in $e2ere &ea&line .re$$ure. It i$ a u$e incre*ental $trateg( w/ere ta$4$ a$$ociate& wit/ eac/ incre*ent are ti*e-bo5e& in t/e following *anner6 $ $ $ Sc/e&ule for eac/ ta$4 i$ a&8u$te& b( wor4ing bac4war& fro* t/e &eli2er( &ate. 9 bo5 i$ .ut aroun& eac/ ta$4 ;/en a ta$4 /it$ t/e boun&ar( of t/e bo5% wor4 $to.$ an& ne5t ta$4 begin$

T/e .rinci.le be/in& ti*e-bo5ing i$ t/e "0-10 rule H$i*ilar to 3areto 3rinci.leJ F rat/er t/an beco*ing $tuc4 on t/e 10B of a ta$4% t/e .ro&uct .rocee&$ towar&$ t/e &eli2er( &ate in "0B of t/e ca$e$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

105

CS605 Software Engineering-II

VU

Lecture No. 0> Software ;ualit2 #%%urance


@ualit( cannot be a$$ure& wit/out fir$t un&er$tan&ing it$ nature an& c/aracteri$tic$. So t/e fir$t 'ue$tion one /a$ to a$4 i$6 w/at i$ 'ualit(L Software 'ualit( i$ &efine& a$ confor*ance to e5.licitl( $tate& functional an& nonfunctional re'uire*ent$% e5.licitl( &ocu*ente& &e2elo.*ent $tan&ar&$% an& i*.licit c/aracteri$tic$ t/at are e5.ecte& of all .rofe$$ionall( &e2elo.e& $oftware. T/i$ &efinition e*./a$i+e$ u.on t/ree i*.ortant .oint$6 $ $ $ Software re'uire*ent$ are t/e foun&ation fro* w/ic/ 'ualit( i$ *ea$ure&. Lac4 of confor*ance i$ lac4 of 'ualit( S.ecifie& $tan&ar&$ &efine a $et of &e2elo.*ent criteria t/at gui&e t/e *anner in w/ic/ $oftware i$ engineere&. If t/e criteria are not followe&% lac4 of 'ualit( will al*o$t $urel( re$ult. 9 $et of i*.licit re'uire*ent$ often goe$ un*entione& Hea$e of u$e% goo& *aintainabilit( etc.J

9not/er 2er( i*.ortant 'ue$tion i$6 7o (ou nee& to worr( about it after t/e co&e /a$ been generate&L In fact% S@9 i$ an u*brella acti2it( t/at i$ a..lie& t/roug/out t/e $oftware .roce$$. 9l$o% &o we care about internal 'ualit( or t/e e5ternal 'ualit(L 9n& finall(% i$ t/ere a relation$/i. between internal an& e5ternal 'ualitie$L T/at i$% &oe$ internal 'ualit( tran$late in e5ternal 'ualit(L In t/e literature% 'ualit( /a$ been &efine& t/roug/ in *an( &ifferent *anner$. Ane grou. belie2e$ t/at t/e 'ualit( /a$ *ea$urable c/aracteri$tic $uc/ a$ c(clo*atic co*.le5it(% co/e$ion% an& cou.ling. ;e can t/en tal4 about 'ualit( fro* &ifferent a$.ect$. @ualit( of &e$ign trie$ to &eter*ine t/e 'ualit( of &e$ign relate& &ocu*ent$ inclu&ing re'uire*ent$% $.ecification$% an& &e$ign. @ualit( of confor*ance loo4$ at t/e i*.le*entation an& if it follow$ t/e &e$ign t/en t/e re$ulting $($te* *eet$ it$ goal$ t/en confor*ance 'ualit( i$ /ig/. 9re t/ere an( ot/er i$$ue$ t/at nee& to be con$i&ere&L Gla$$ &efine$ 'ualit( a$ a *ea$ure of u$er $ati$faction w/ic/ i$ &efine& b( co*.liant .ro&uct P goo& 'ualit( P &eli2er( wit/in bu&get an& $c/e&ule 7e#arco &efine$ .ro&uct 'ualit( a$ a function of /ow *uc/ it c/ange$ t/e worl& for t/e better. So% t/ere are *an( &ifferent wa( to loo4 at t/e 'ualit(. ;ualit2 #%%urance Goal of 'ualit( a$$urance i$ to .ro2i&e t/e *anage*ent wit/ t/e nece$$ar( &ata to be infor*e& about .ro&uct 'ualit(. It con$i$t$ of au&iting an& re.orting function$ of

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

106

CS605 Software Engineering-II

VU

*anage*ent. If &ata .ro2i&e& t/roug/ @9 i&entifie$ .roble*$% t/e *anage*ent &e.lo($ t/e nece$$ar( re$ource$ to fi5 it an& /ence ac/ie2e$ &e$ire& 'ualit( control. Co%t of &ualit2 9 2er( $ignificant 'ue$tion i$6 &oe$ 'ualit( a$$urance a&& an( 2alue. T/at i$% i$ wort/ $.en&ing a lot of *one( in 'ualit( a$$urance .ractice$L In or&er to un&er$tan& t/e i*.act of 'ualit( a$$urance .ractice$% we /a2e to un&er$tan& t/e co$t of 'ualit( Hor lac4 t/ereofJ in a $($te*. @ualit( /a$ a &irect an& in&irect co$t in t/e for* of co$t of .re2ention% a..rai$al% an& failure. If we tr( to .re2ent .roble*$% ob2iou$l( we will /a2e to incur co$t. T/i$ co$t inclu&e$6 $ $ $ $ @ualit( .lanning =or*al tec/nical re2iew$ Te$t e'ui.*ent Training

;e will &i$cu$$ t/e$e in *ore &etail in t/e later $ection$. T/e co$t of a..rai$al inclu&e$ acti2itie$ to gain in$ig/t into t/e .ro&uct con&ition. It in2ol2e$ in-.roce$$ an& inter-.roce$$ in$.ection an& te$ting. 9n& finall(% failure co$t. =ailure co$t /a$ two co*.onent$6 internal failure co$t an& e5ternal failure co$t. Internal failure co$t re'uire$ rewor4% re.air% an& failure *o&e anal($i$. An t/e ot/er /an&% e5ternal failure co$t in2ol2e$ co$t for co*.laint re$olution% .ro&uct return an& re.lace*ent% /el.-line $u..ort% warrant( wor4% an& law $uit$. It i$ tri2ial to $ee t/at co$t increa$e$ a$ we go fro* .re2ention to &etection to internal failure to e5ternal failure. T/i$ i$ &e*on$trate& wit/ t/e /el. of t/e following e5a*.le6 Let u$ a$$u*e t/at a total of !053 /our$ were $.ent in$.ecting 200%000 line$ of co&e wit/ t/e re$ult t/at 3112 .otential &efect$ were .re2ente&. 9$$u*ing a .rogra**er co$t of S40 .er /our% t/e total co$t of .re2enting 3112 &efect$ wa$ S3 2%120% or roug/l( S"1 .er &efect. Let u$ now co*.are t/e$e nu*ber$ to t/e co$t of &efect re*o2al once t/e .ro&uct /a$ been $/i..e& to t/e cu$to*er. Su..o$e t/at t/ere /a& been no in$.ection$% an& t/e .rogra**er$ /a& been e5tra careful an& onl( one &efect one 1000 line$ e$ca.e& into t/e .ro&uct $/i.*ent. T/at woul& *ean t/at 200 &efect$ woul& $till /a2e to be fi5e& in t/e fiel&. 9$ an e$ti*ate& co$t of S25000 .er fi5% t/e co$t woul& be S5 #illion or a..ro5i*atel( 1 ti*e$ *ore e5.en$i2e t/an t/e total co$t of &efect .re2ention T/at *ean$% 'ualit( tran$late$ to co$t $a2ing$ an& an i*.ro2e& botto* line. S;# #cti,itie% T/ere are two &ifferent grou.$ in2ol2e& in S@9 relate& acti2itie$6 $ $ Software engineer$ w/o &o t/e tec/nical wor4 S@9 grou. w/o i$ re$.on$ible for @9 .lanning% o2er$ig/t% recor& 4ee.ing% anal($i$% an& re.orting Software engineer$ a&&re$$ 'ualit( b( a..l(ing $oli& tec/nical *et/o&$ an& *ea$ure$% con&ucting for*al an& tec/nical re2iew$% an& .erfor*ing well .lanne& $oftware te$ting. T/e S@9 grou. a$$i$t$ t/e $oftware tea* in ac/ie2ing a /ig/ 'ualit( .ro&uct.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

107

CS605 Software Engineering-II

VU

S;# Frou* #cti,itie% 9n S@9 .lan i$ &e2elo.e& for t/e .ro8ect &uring .ro8ect .lanning an& i$ re2iewe& b( all $ta4e /ol&er$. T/e .lan inclu&e$ t/e i&entification of6 $ $ $ $ $ $ E2aluation$ to be .erfor*e& 9u&it$ an& re2iewe& to be .erfor*e& Stan&ar&$ t/at are a..licable to t/e .ro8ect 3roce&ure$ for error re.orting an& trac4ing 7ocu*ent$ to be .ro&uce& b( t/e S@9 grou. 9*ount of fee&bac4 .ro2i&e& to t/e $oftware .ro8ect tea*

T/e grou. .artici.ate$ in t/e &e2elo.*ent of t/e .ro8ect:$ $oftware .roce$$ &e$cri.tion. T/e $oftware tea* $elect$ t/e .roce$$ an& S@9 grou. re2iew$ t/e .roce$$ &e$cri.tion for co*.liance wit/ t/e organi+ational .olicie$% internal $oftware $tan&ar&$% e5ternall( i*.o$e& $tan&ar&$% an& ot/er .art$ of t/e $oftware .ro8ect .lan. T/e S@9 grou. al$o re2iew$ $oftware engineering acti2itie$ to 2erif( co*.liance wit/ t/e &efine& $oftware .roce$$. It i&entifie$% &ocu*ent$% an& trac4$ &e2iation$ fro* t/e .roce$$ an& 2erifie$ t/at t/e correction$ /a2e been *a&e. In a&&ition% it au&it$ &e$ignate& $oftware wor4 .ro&uct$ to 2erif( co*.liance wit/ t/o$e &efine& a$ .art of t/e $oftware .roce$$. It% re2iew$ $electe& wor4 .ro&uct$% i&entifie$% &ocu*ent$% an& trac4$ &e2iation$C 2erifie$ t/at correction$ /a2e been *a&eC an& re.ort$ t/e re$ult$ of it$ wor4 to t/e .ro8ect *anager. T/e ba$i$ .ur.o$e i$ to en$ure t/at &e2iation$ in $oftware wor4 an& wor4 .ro&uct$ are &ocu*ente& an& /an&le& accor&ing to &ocu*ente& .roce&ure$. T/e$e &e2iation$ *a( be encountere& in t/e .ro8ect .lan% .roce$$ &e$cri.tion% a..licable $tan&ar&$% or tec/nical wor4 .ro&uct$. T/e grou. recor&$ an( non-co*.liance an& re.ort$ to $enior *anage*ent an& non-co*.liant ite*$ are recor&e& an& trac4e& until t/e( are re$ol2e&. 9not/er 2er( i*.ortant role of t/e grou. i$ to coor&inate t/e control an& *anage*ent of c/ange an& /el. to collect an& anal(+e $oftware *etric$. ;ualit2 Control T/e ne5t 'ue$tion t/at we nee& to a$4 i$% once we /a2e &efine& /ow to a$$e$$ 'ualit(% /ow are we going to *a4e $ure t/at our .roce$$e$ &eli2er t/e .ro&uct wit/ t/e &e$ire& 'ualit(. T/at i$% /ow are we going to control t/e 'ualit( of t/e .ro&uctL T/e ba$ic .rinci.le of 'ualit( control i$ to control t/e 2ariation a$ 2ariation control i$ t/e /eart of 'ualit( control. It inclu&e$ re$ource an& ti*e e$ti*ation% te$t co2erage% 2ariation in nu*ber of bug$% an& 2ariation in $u..ort. =ro* one .ro8ect to anot/er we want to *ini*i+e t/e .re&icte& re$ource$ nee&e& to co*.lete a .ro8ect an& calen&ar ti*e. T/i$ in2ol2e$ a $erie$ of in$.ection% re2iew$% an& te$t$ an& inclu&e$ fee&bac4 loo.. So 'ualit( control i$ a co*bination of *ea$ure*ent an& fee&bac4 an& co*bination of auto*ate& tool$ an& *anual interaction.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

108

CS605 Software Engineering-II

VU

Lecture No. 0? Software 4e,iew%


Software re2iew$ are t/e filter for t/e $oftware engineering .roce$$. T/e( re a..lie& at 2ariou$ &ifferent .oint$ an& $er2e to unco2er error$ t/at can be re*o2e& an& /el. to .urif( t/e $oftware engineering acti2itie$. In t/i$ conte5t it i$ u$eful to loo4 at t/e D0-*o&elE of $oftware &e2elo.*ent. T/i$ *o&el e*./a$i+e$ t/at S@9 i$ a function .erfor*e& at all $tage$ of $oftware &e2elo.*ent life c(cle. 9t t/e initial $tage$ Hre'uire*ent% arc/itecture% &e$ign% co&eJ% it i$ ac/ie2e& t/roug/ acti2itie$ 4nown a$ =or*al Tec/nical ,e2iew$ or =T,. 9t t/e later $tage$ Hintegration an& acce.tanceJ% te$ting co*e$ into .icture.

,e'uire*ent$ In$.ection 9rc/itecture In$.ection 7e$ign In$.ection Co&e In$.ection

9cce.tance Te$t

Integration Te$t

1nit Te$t

T/e 0-#o&el

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

109

CS605 Software Engineering-II I'*ortance of re,iew%

VU

Tec/nical wor4 nee&$ re2iewing for t/e $a*e rea$on t/at .encil$ nee&$ era$er$6 To err i$ /u*an. T/e $econ& rea$on t/at we nee& tec/nical re2iew$ i$ alt/oug/ t/at .eo.le are goo& at catc/ing error$% large cla$$ of error$ e$ca.e t/e originator *ore ea$il( t/an t/e( e$ca.e an(one el$e. =ree&*an &efine$ a re2iew F an( re2iew F a$ a wa( of u$ing t/e &i2er$it( of a grou. of .eo.le to6 $ 3oint out nee&e& i*.ro2e*ent$ in t/e .ro&uct of a $ingle .er$on or tea* $ Confir* t/o$e .art$ of a .ro&uct in w/ic/ i*.ro2e*ent i$ eit/er not &e$ire& or no nee&e& $ 9c/ie2e tec/nical wor4 of *ore unifor*% or at lea$t *ore .re&ictable% 'ualit( t/an can be ac/ie2e& wit/out re2iew$% in or&er to *a4e tec/nical wor4 *ore *anageable. ,e2iew$ /el. t/e &e2elo.*ent tea* in i*.ro2ing t/e &efect re*o2al efficienc( an& /ence .la( an i*.ortant role in t/e &e2elo.*ent of a /ig/-'ualit( .ro&uct. T2*e% of 4e,iew% T/ere are *an( t(.e$ of re2iew$. In general t/e( can be categori+e& into two *ain categorie$ na*el( infor*al an& for*al tec/nical re2iew$. =or*al Tec/nical re2iew$ are $o*eti*e$ calle& a$ wal4t/roug/$ or in$.ection$. T/e( are t/e *o$t effecti2e filter fro* @9 $tan&.oint. To un&er$tan& t/e $ignificance of t/e$e re2iew$% let u$ loo4 at t/e &efect a*.lification *o&el $/own below. T/i$ *o&el &e.ict$ t/at eac/ &e2elo.*ent $te. in/erit$ certain error$ fro* t/e .re2iou$ $te.. So*e of t/e$e error$ are 8u$t .a$$e& t/roug/ to t/e ne5t $te. w/ile $o*e are wor4e& on an& /ence are a*.lifie& wit/ a ratio of 165. In a&&ition% eac/ $te. *a( al$o generate $o*e new error$. If eac/ $te. /a$ $o*e *ec/ani$* for error &etection% $o*e of t/e$e error$ *a( be &etecte& an& re*o2e& an& t/e re$t are .a$$e& on to t/e ne5t $te..

7efect$ Error$ fro* .re2iou$ $te. Error$ 3a$$e& T/roug/ 9*.lifie& Error$ 165 Newl( generate& error$

7etection 3ercentage Efficienc( =or error &etection

Error$ .a$$e& To ne5t $te.

Development Step

Let u$ now a$$u*e t/at we &o not /a2e an( S@9 relate& acti2itie$ for t/e fir$t two $tage$ an& we are onl( u$ing te$ting for &etection of an( &efect$. Let u$ a$$u*e t/at t/e

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

110

CS605 Software Engineering-II

VU

3reli*inar( &e$ign generate& 10 &efect$ w/ic/ were .a$$e& on to 7etaile& &e$ign. 9t t/at ./a$e% 6 &efect$ were .a$$e& on to t/e ne5t $tage$ an& 4 were a*.lifie& at a ration of 161.5. In a&&ition% t/ere were 25 new &efect$ intro&uce& at t/i$ $tage. T/erefore% a total of 3! &efect$ were .a$$e& on to t/e ne5t $tage a$ $/own in t/e &iagra*. In t/e Co&e an& 1nite te$t $tage% we $tart to te$t our $($te* an& a$$u*ing 20B &efect re*o2al efficienc( of t/i$ $tage% "4 &efect$ H 0B of H10 P 2! T 3 P 25JJ are .a$$e& on to t/e ne5t $tage. T/i$ .roce$$ continue$ an& t/e $($te* i$ &eli2ere& wit/ 12 &efect$ re*aining in t/e .ro&uct.

0 0 10

10 0B

3! 6 4 T1.5 0B 25 7etaile& 7e$ign


4!

"4 10 2! T 3 20B 25 Co&e O1nit te$t


24 12 50B

3reli*inar( 7e$ign
"4

"4 0 0

50B

4! 0 0

50B

24 0 0

Integration te$t

0ali&ation te$t

S($te* te$t

If =T, are u$e& in t/e earlier $tage$% t/e 'ualit( of t/e en&-.ro&uct i$ *uc/ better a$ $/own in t/e following &iagra*. Note t/at in t/i$ ca$e we /a2e co&e in$.ection in a&&ition to unit te$ting at t/e t/ir& $tage an& t/e &efect re*o2al efficienc( of t/at $tage i$ 60B.

0 0 10

3 !0B

15 2 1 T1.5 50B 25 7etaile& 7e$ign 12

24 5 10 T 3 60B 25 Co&e O1nit te$t 6 3 0 0 50B

3reli*inar( 7e$ign 24 0 0 50B

0 0

50B

Integration te$t

0ali&ation te$t

S($te* te$t

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

111

CS605 Software Engineering-II

VU

Lecture No. 0B .or'al Tec!nical 4e,iew%


=or*al Tec/nical ,e2iew$ are con&ucte& b( $oftware engineer$. T/e .ri*ar( ob8ecti2e i$ to fin& error$ &uring t/e .roce$$ $o t/at t/e( &o not beco*e &efect$ after relea$e of $oftware a$ t/e( unco2er error$ in function% logic &e$ign% or i*.le*entation. T/e i&ea i$ to /a2e earl( &i$co2er( of error$ $o t/e( &o not .ro.agate to t/e ne5t $te. in t/e .roce$$. T/e( al$o en$ure t/at t/e $oftware /a$ been re.re$ente& accor&ing to .re&efine& $tan&ar&$ an& it i$ &e2elo.e& in a unifor* *anner. T/e( *a4e .ro8ect$ *ore *anageable an& /el. groo* new re$ource$ a$ well a$ .ro2i&e bac4u. an& continuit(. =T,$ inclu&e wal4t/roug/$% in$.ection$% an& ot/er $*all grou. tec/nical a$$e$$*ent$ of $oftware. Fuideline% for wal(t!roug!% =T,$ are u$uall( con&ucte& in a *eeting t/at i$ $ucce$$ful onl( if it i$ .ro.erl( .lanne&% controlle&% an& atten&e&. T/e .ro&ucer infor*$ t/e 3# t/at t/e ;3 i$ rea&( an& t/e re2iew i$ nee&e&. T/e re2iew *eeting con$i$t$ of 3-5 .eo.le an& a&2ance& .re.aration i$ re'uire&. It i$ i*.ortant t/at t/i$ .re.aration $/oul& not re'uire *ore t/an 2 /our$ of wor4 .er .er$on. It $/oul& focu$ on $.ecific Han& $*allJ .art of t/e o2erall $oftware. =or e5a*.le% in$tea& of t/e entire &e$ign% wal4t/roug/$ are con&ucte& for eac/ co*.onent% or $*all grou. of co*.onent$. )( narrowing focu$% =T, /a$ a /ig/ .robabilit( of unco2ering error$. It i$ i*.ortant to re*e*ber t/at t/e focu$ i$ on a wor4 .ro&uct for w/ic/ t/e .ro&ucer of t/e ;3 a$4$ t/e .ro8ect lea&er for re2iew. 3ro8ect lea&er infor*$ t/e re2iew lea&er. T/e re2iew lea&er e2aluate$ t/e ;3 for rea&ine$$ an& if $ati$fie& generate$ co.ie$ of re2iew *aterial an& &i$tribute$ to re2iewer$ for a&2ance& .re.aration. T/e agen&a i$ al$o .re.are& b( t/e re2iew lea&er. 4e,iew -eeting% ,e2iew *eeting i$ atten&e& b( t/e re2iew lea&er% all re2iewer$% an& t/e .ro&ucer. Ane of t/e re2iewer ta4e$ t/e role$ of recor&er. 3ro&ucer wal4$ t/roug/ t/e .ro&uct% e5.laining t/e *aterial w/ile ot/er re2iewer$ rai$e i$$ue$ ba$e& u.on t/eir a&2ance& .re.aration. ;/en 2ali& .roble*$ or error$ are recor&e&% t/e recor&er note$ eac/ one of t/e*. 9t t/e en& of t/e ,#% all atten&ee$ of t/e *eeting *u$t &eci&e w/et/er to6 $ $ $ 9cce.t t/e .ro&uct wit/out furt/er *o&ification ,e8ect t/e .ro&uct &ue to $e2ere error$ + #a8or error$ i&entifie& + #u$t re2iew again after fi5ing 9cce.t t/e .ro&uct .ro2i$ionall( + #inor error$ to be fi5e& + No furt/er re2iew

4e,iew 4e*orting and 4ecord (ee*ing - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

112

CS605 Software Engineering-II

VU

7uring t/e =T, t/e recor&er note$ all t/e i$$ue$. T/e( are $u**ari+e& at t/e en& an& a re2iew i$$ue li$t i$ .re.are&. 9 $u**ar( re.ort i$ .ro&uce& t/at inclu&e$6 $ ;/at i$ re2iewe& $ ;/o re2iewe& it $ ;/at were t/e fin&ing$ an& conclu$ion$ It t/en beco*e$ .art of .ro8ect /i$torical recor&. T!e re,iew i%%ue li%t It i$ $o*eti*e$ 2er( u$eful to /a2e a .ro.er re2iew i$$ue li$t. It /a$ two ob8ecti2e$. $ $ I&entif( .roble* area$ wit/in t/e ;3 9ction ite* c/ec4li$t

It i$ i*.ortant to e$tabli$/ a follow-u. .roce&ure to en$ure t/at ite*$ on t/e i$$ue li$t /a2e been .ro.erl( a&&re$$e&. 4e,iew Fuideline% It i$ e$$ential to note t/at an uncontrolle& re2iew can be wor$e t/an no re2iew. T/e ba$i$ .rinci.le i$ t/at t/e re2iew $/oul& focu$ on t/e .ro&uct an& not t/e .ro&ucer $o t/at it &oe$ not beco*e .er$onal. ,e*e*ber to be $en$iti2e to .er$onal ego$. Error$ $/oul& be .ointe& out gentl( an& t/e tone $/oul& be loo$e an& con$tructi2e. T/i$ can be ac/ie2e& b( $etting an agen&a an& *aintaining it. In or&er to &o $o% t/e re2iew tea* $/oul&6 $ $ $ $ $ $ $ $ $ 92oi& &rift Li*it &ebate an& rebuttal Enunciate .roble* area$ but &on:t tr( to $ol2e all .roble*$ Ta4e written note$ Li*it t/e nu*ber of .artici.ant$ an& in$i$t u.on a&2ance& .re.aration 7e2elo. a c/ec4li$t for eac/ .ro&uct t/at i$ li4el( to be re2iewe& 9llocate re$ource$ an& $c/e&ule ti*e for =T,$ Con&uct *eaningful training for all re2iewer$ ,e2iew (our earl( re2iew$ 7eter*ine w/at a..roac/ wor4$ be$t for (ou

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

113

CS605 Software Engineering-II

VU

Lecture No. 30 Stati%tical Software ;ualit2 #%%urance


Stati$tical S@9 i$ a tec/ni'ue t/at *ea$ure$ t/e 'ualit( in a 'uantitati2e fa$/ion. It i*.lie$ t/at infor*ation about &efect$ i$ collecte& an& categori+e& an& an atte*.t i$ *a&e to trace eac/ &efect to un&erl(ing cau$e. It u$e$ 3areto 3rinci.le to i&entif( 2ital cau$e$ H 0B of &efect$ can be trace& to 20B of cau$e$J an& *o2e$ to correct t/e .roble*$ t/at /a2e cau$e& t/e &efect$. E)a'*le Let u$ a$$u*e t/at infor*ation about &efect$ i$ collecte& for one (ear an& categori+e& a$ follow$6 1. Inco*.lete or erroneou$ $.ecification$ HIESJ 2. #i$inter.retation of cu$to*er co**unication H#CCJ 3. Intentional &e2iation fro* $.ecification$ HI7SJ 4. 0iolation of .rogra**ing $tan&ar&$ H03SJ 5. Error in &ata re.re$entation HE7,J 6. Incon$i$tent co*.onent interface HICIJ !. Error in &igital logic HE7LJ . Inco*.lete or erroneou$ te$ting HIETJ ". Inaccurate or inco*.lete &ocu*entation HII7J 10. Error in .rogra**ing language tran$lation of &e$ign H3LTJ 11. 9*biguou$ or incon$i$tent >CI H>CIJ 12. #i$cellaneou$ H#ISJ T/e following &ata i$ collecte& for t/e$e categorie$ Error (ategory Seriou% IES #CC I7S 03S E7, ICI E7L IET II7 3LT >CI #IS 34 12 1 0 26 " 14 12 2 15 3 0 -oderate -inor 6 6 24 15 6 1 12 35 20 1" 1! 15 41 103 !6 23 10 36 31 1" 4 14 26 Sub Total 205 156 4 25 130 5 45 "5 36 60 2 56

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

114

CS605 Software Engineering-II Total 12 3!" ;e can ea$il( $ee t/e following6 $ $ 435 "42

VU

IES% #CC% an& E7, are t/e 2ital error$ F cau$e 53B of all error$ IES% E7,% 3LT% an& E7L are 2ital if onl( $eriou$ error$ are con$i&ere&

;e now $tart correcti2e action focu$e& on 2ital few. =or e5a*.le for E7, we re2iew t/e &ata re.re$entation tec/ni'ue$ to i&entif( t/e .o$$ible i*.ro2e*ent area$ an& a&o.t a u$e ca$e tool for &ata *o&eling an& .erfor* $tringent &ata &e$ign re2iew$. Error Inde) 6EI7 9not/er $tati$tical tec/ni'ue 4nown a$ Error In&e5 HEIJ i$ u$e& to &e2elo. an o2erall in&ication of i*.ro2e*ent in $oftware 'ualit(. T/e EI i$ co*.ute& a$ follow$6 Let $ $ $ $ $ $ Ei F t/e total nu*ber of error$ unco2ere& &uring t/e it/ $te. in t/e SE .roce$$ Si F nu*ber of $eriou$ error$ #i F nu*ber of *o&erate error$ Ti F nu*ber of *inor error$ 3S F .ro&uct $i+e at t/e it/ $te. w$% w*% wt F weig/ting factor$ for $eriou$% *o&erate% an& *inor error$. ,eco**en&e& 2alue$ for t/e$e are 10% 3% 1 re$.ecti2el(.

9t eac/ $te. of t/e $oftware .roce$$ a *hase &ndex i$ co*.ute& a$6 3Ii Z w$HSiOEiJ P w*H#iOEiJ P wtHTiOEiJ Now EI i$ co*.ute& a$ t/e cu*ulati2e effect on eac/ 3Ii Z [HI 5 3IiJO3S It i$ i*.ortant to note t/at weig/ting error$ encountere& in t/e SE .roce$$e$ *ore /ea2il( t/an t/o$e encountere& earlier. 9$ $tate& earlier% it can be u$e& to &e2elo. an o2erall in&ication of i*.ro2e*ent in $oftware 'ualit(. Software 4eliabilit2 Software reliabilit( i$ anot/er 2er( i*.ortant 'ualit( factor an& i$ &efine& a$ .robabilit( of failure free o.eration of a co*.uter .rogra* in a $.ecifie& en2iron*ent for a $.ecifie& ti*e. =or e5a*.le% a .rogra* M can be e$ti*ate& to /a2e a reliabilit( of 0."6 o2er ela.$e& /our$. Software reliabilit( can be *ea$ure&% &irecte&% an& e$ti*ate& u$ing /i$torical an& &e2elo.*ent &ata. T/e 4e( to t/i$ *ea$ure*ent i$ t/e *eaning of ter* failure. =ailure i$ &efine& a$ non-confor*ance to $oftware re'uire*ent$. It can be gra&e& in *an( &ifferent wa($ a$ $/own below6 $ $ $ =ro* anno(ing to cata$tro./ic Ti*e to fi5 fro* *inute$ to *ont/$ ,i..le$ fro* fi5ing

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

115

CS605 Software Engineering-II

VU

It i$ al$o .ertinent to un&er$tan& t/e &ifference between /ar&ware an& $oftware reliabilit(. >ar&ware reliabilit( i$ .re&icte& on failure &ue to wear rat/er t/an failure &ue to &e$ign. In t/e ca$e of $oftware% t/ere i$ no wear an& tear. T/e reliabilit( of $oftware i$ &eter*ine& b( #ean ti*e between failure H#T)=J. #T)= i$ calculate& a$6 #T)= Z #TT= P #TT, ;/ere #TT= i$ t/e #ean Ti*e to =ailure an& #TT, i$ t/e #ean ti*e re'uire& to ,e.air. 9rguabl( #T)= i$ far better t/an &efect$O4loc a$ eac/ error &oe$ not /a2e t/e $a*e failure rate an& t/e u$er i$ concerne& wit/ failure an& not wit/ total error count. 9 relate& i$$ue i$ t/e notion of a2ailabilit(. It i$ &efine& a$ t/e .robabilit( t/at a .rogra* i$ o.erating accor&ing to re'uire*ent$ at a gi2en .oint in ti*e. It can be calculate& a$ 92ailabilit( Z H#TT=O#T)=J 5 100 an& clearl( &e.en&$ u.on #TT,.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

116

CS605 Software Engineering-II

VU

Lecture No. 31 Software Safet2


Software Safet( i$ a $oftware S@9 acti2it( t/at focu$e$ on i&entification of .otential /a+ar&$ t/at *a( affect $oftware negati2el( an& cau$e an entire $($te* to fail. #o&eling an& anal($i$ .roce$$ i$ con&ucte& a$ .art of $oftware $afet( an& /a+ar&$ are i&entifie& an& categori+e& b( criticalit( an& ri$4. E)a'*le Let u$ a$$u*e t/at t/e following /a+ar&$ are a$$ociate& wit/ a co*.uter-ba$e& crui$e control for an auto*obile6 $ $ $ $ Cau$e$ uncontrolle& acceleration t/at cannot be $to..e& 7oe$ not re$.on& to &e.re$$ion of bra4e .e&al 7oe$ not engage w/en $witc/ i$ acti2ate& Slowl( lo$e$ or gain$ $.ee&

Ance $($te*-le2el /a+ar&$ are i&entifie&% anal($i$ tec/ni'ue$ are u$e& to a$$ign $e2erit(% an& .robabilit( of occurrence. T/i$ tec/ni'ue i$ $i*ilar to ri$4 anal($i$. To be effecti2e% $oftware *u$t be anal(+e& in t/e conte5t of t/e entire $($te*. 9nal($i$ tec/ni'ue$ $uc/ a$ fault tree anal($i$ can be u$e& to .re&ict t/e c/ain of e2ent$ t/at can cau$e /a+ar&$ an& t/e .robabilit( t/at eac/ of t/e$e e2ent$ will occur to create t/e c/ain. Ance /a+ar&$ are i&entifie& an& anal(+e&% $afet(-relate& re'uire*ent$ can be $.ecifie& for t/e $oftware.

,eliabilit( an& $afet( are clo$el( relate&. Software reliabilit( u$e$ $tati$tical tec/ni'ue$ to &eter*ine t/e li4eli/oo& t/at a $oftware failure will occur. Accurrence of a $oftware failure &oe$ not nece$$aril( re$ult in a /a+ar& or *i$/a.. An t/e ot/er /an&% $oftware $afet( e5a*ine$ t/e wa($ in w/ic/ failure$ re$ult in con&ition$ t/at can lea& to a *i$/a..

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

117

CS605 Software Engineering-II

VU

Lecture No. 30 1o(a-Ao(e 6-i%ta(e-1roofing7


3o4a-(o4e i$ a @9 tec/ni'ue &e2elo.e& b( S/ingo at To(ota in 1"60:$. 3o4a-(o4e &e2ice$ are *ec/ani$*$ t/at lea& to .re2ention of .otential 'ualit( .roble* before it occur$ or t/e ra.i& &etection of 'ualit( .roble*$ if t/e( are intro&uce&. $ E5a*.le$6 + Lig/t on if t/e car &oor i$ not .ro.erl( clo$e& + ;arning bee. if t/e engine i$ turne&-off w/en lig/t$ are on

C!aracteri%tic of a 1o(a-2o(e de,ice $ $ $ It i$ $i*.le an& c/ea. It i$ .art of t/e .roce$$ It i$ locate& near t/e .roce$$ ta$4 w/ere t/e *i$ta4e occur$

E)a'*le of 1o(a-2o(e in %oftware Let u$ a$$u*e t/at aa9 $oftware .ro&uct$ co*.an( $ell$ a..lication $oftware to an international *ar4et. T/e .ull-&own *enu$ an& a$$ociate& *ne*onic$ .ro2i&e& wit/ eac/ a..lication *u$t reflect t/e local language. =or e5a*.le% t/e Engli$/ language *enu ite* for DClo$eE /a$ t/e *ne*onic DCE a$$ociate& wit/ it. ;/en t/e a..lication i$ $ol& to 1r&u $.ea4ing u$er$% t/e $a*e *enu ite* i$ D)an& IarenE wit/ *ne*onic EbE. To i*.le*ent t/e a..ro.riate *enu entr( for eac/ locale% a Dlocali+erE tran$late$ t/e *enu$ accor&ingl(. T/e .roble* i$ to en$ure t/at eac/ *enu entr( confor*$ to a..ro.riate $tan&ar&$ an& t/ere are no conflict$% regar&le$$ of t/e language u$e&. ;e can con$i&er a .re2ention &e2ice to write a .rogra* to generate *ne*onic$ auto*aticall(% gi2en a li$t of label$ in eac/ *enu. It woul& .re2ent *i$ta4e$% but t/e .roble* of c/oo$ing a goo& *ne*onic i$ &ifficult an& t/e effort re'uire& woul& not be 8u$tifie& b( t/e benefit gaine&. It i$ t/erefore not a goo& 3o4a-(o4e &e2ice a$ it i$ not $i*.le. ;e now con$i&er anot/er .re2ention &e2ice. In t/i$ ca$e we write a .rogra* to .re2ent t/e locali+er fro* c/oo$ing *ne*onic$ t/at &i& not *eet t/e criteria. It woul& .re2ent *i$ta4e$ but t/e benefit i$ *ini*al a$ incorrect *ne*onic$ are ea$( enoug/ to &etect an& correct after t/e( occur. So once again t/i$ i$ not a goo& c/oice. ;e now con$i&er a &etection &e2ice. In t/i$ ca$e we write a .rogra* to 2erif( t/at t/e c/o$en *enu label$ an& *ne*onic$ *eet t/e criteria. ;e run t/i$ .rogra* to &etect error$. Error$ are $ent bac4 to locali+er. Since t/i$ &e2ice re'uire$ a lot of bac4 an& fort/ *o2e*ent% it 2iolate$ t/e .rinci.le of co-location. ;e now *o&if( it to t/e following &etection &e2ice. ;e write a .rogra* to 2erif( t/at t/e c/o$en *enu label$ an& *ne*onic$ *eet t/e criteria. T/e locali+er woul& run t/i$ .rogra* to &etect error$. It woul& gi2e 'uic4 fee&bac4 an& /ence it i$ a goo& 3o4a-(o4e &e2ice.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

118

CS605 Software Engineering-II

VU

Lecture No. 33 Software Configuration -anage'ent 6SC-7


<ou *a( recall t/at $oftware configuration *anage*ent HSC#J i$ one of t/e fi2e I39 re'uire& for an organi+ation to be at C## le2el 2. T/at *ean$% accor&ing to SEI% effecti2e .ro8ect *anage*ent i$ not .o$$ible wit/out /a2ing a .ro.er SC# function in .lace. T/e ba$ic i&ea be/in& SC# i$ to *anage an& control c/ange. 9$ *entione& b( )er$off% no *atter w/ere (ou are in t/e $($te* life c(cle% t/e $($te* will c/ange% an& t/e &e$ire to c/ange it will .er$i$t t/roug/out t/e life c(cle. It i$ t/erefore e$$ential t/at we *anage an& control it in a fa$/ion t/at t/i$ continuou$ c/ange &oe$ not con2ert into c/ao$. T/i$ /a$ beco*e *ore i*.ortant in t/e conte5t of conte*.orar( $oftware &e2elo.*ent a$ we are getting *ore an& *ore co*.le5 $oftware .ro8ect$ in ter*$ of $i+e% $o./i$tication% an& tec/nolog(. In a&&ition% t/e$e $oftware $($te*$ are u$e& b( *illion$ of u$er$ all o2er t/e worl&. T/e$e $($te*$ nee& *ultilingual an& *ulti-.latfor* $u..ort H/ar&ware% $oftwareJ an& /a2e to o.erate in a &i$tribute& en2iron*ent. T/at *ean$ t/at a $oftware $($te* *a( co*e in *an( configuration fla2or$ inclu&ing &e$4to.% $tan&ar&% .rofe$$ional% an& enter.ri$e 2er$ion$. T/ere i$ a brutal co*.etition out t/ere an& an( co*.lacenc( *a( re$ult in lo$ing a big *ar4et $/are. T/e /uge *aintenance fre'uenc( F correcti2e an& a&a.ti2e F *a4e$ life e2en *ore &ifficult. #ore co*.le5 &e2elo.*ent en2iron*ent wit/ $/orter reaction ti*e re$ult$ in confu$ion an& c/ao$R C!ange C!ao% T/i$ fre'uent c/ange% if not *anage& .ro.erl(% re$ult$ in c/ao$. =ir$t of all t/ere woul& be .roble*$ of i&entification an& trac4ing w/ic/ woul& re$ult in 'ue$tion$ li4e t/e following6 DT/i$ .rogra* wor4e& (e$ter&a(. ;/at /a..ene&LE DI fi5e& t/i$ error la$t wee4. ;/( i$ it bac4LE D;/ere are all *( c/ange$ fro* la$t wee4LE DT/i$ $ee*$ li4e an ob2iou$ fi5. >a$ it been trie& beforeLE D;/o i$ re$.on$ible for t/i$ c/angeLE T/en t/ere are .roble*$ of 2er$ion $election. T/e t(.ical .roble*$ face& are6 D>a$ e2er(t/ing been co*.ile&L Te$te&LE D>ow &o I configure for te$t% wit/ *( u.&ate$ an& no ot/er$LE D>ow &o I e5clu&e t/i$ inco*.leteOfault( c/angeLE DI can:t re.ro&uce t/e error in t/i$ co.(RE DE5actl( w/ic/ fi5e$ went into t/i$ configurationLE DA/ *( Go&R. I nee& to *erge 250 file$RE Nobo&( 4now$ w/ic/ 2er$ion$ of .rogra*$ are final o ;/ere i$ t/e late$t 2er$ionL o ;/ic/ 2er$ion i$ t/e rig/t oneL I /a2e $o *an( o I /a2e lo$t *( late$t c/ange$ Late$t 2er$ion$ of co&e o2erwritten b( ol& 2er$ion$

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

119

CS605 Software Engineering-II T/ere wa$ a *inor .roble*% I fi5e& it but it i$ no longer wor4ing o I can:t figure-out t/e c/ange$ *a&e to t/e .re2iou$ 2er$ion. o I can:t go bac4

VU

T/en t/ere are $oftware &eli2er( .roble*$. D;/ic/ configuration &oe$ t/i$ cu$to*er /a2eLE D7i& we &eli2er a con$i$tent configurationLE D7i& t/e cu$to*er *o&if( t/e co&eLE DT/e cu$to*er $4i..e& t/e .re2iou$ two relea$e$. ;/at /a..en$ if we $en& /i* t/e new oneLE S/i..e& t/e wrong 2er$ion to t/e client.

T/i$ i$ not all. T/ere *a( be *ore c/ao$ in t/e following $/a.e$ an& for*$6 T/e &e$ign &ocu*ent i$ out of $(nc wit/ .rogra*$ I &on:t 4now if all t/e c/ange$ t/at were $ugge$te& /a2e been incor.orate& ;/ic/ co&e wa$ $ent to te$tingL

SC# i$ a function t/at% if i*.le*ente&% will re&uce t/e$e .roble*$ to a *ini*al le2el. Configuration 'anage'ent 9$ &efine& b( C##% t/e .ur.o$e of SC# i$ to e$tabli$/ an& *aintain t/e integrit( or $oftware .ro&uct$ t/roug/ t/e .ro8ect:$ life c(cle. Configuration *anage*ent i$ concerne& wit/ *anaging e2ol2ing $oftware $($te*$. It ac4nowle&ge$ t/at $($te* c/ange i$ a tea* acti2it( an& t/u$ it ai*$ to control t/e co$t$ an& effort in2ol2e& in *a4ing c/ange$ to a $($te*. SC# in2ol2e$ t/e &e2elo.*ent an& a..lication of .roce&ure$ an& $tan&ar&$ to *anage an e2ol2ing $oftware .ro&uct an& i$ .art of a *ore general 'ualit( *anage*ent .roce$$. "a%eline ;/en relea$e& to C#% $oftware $($te*$ are calle& baselines an& $er2e a$ t/e $tarting .oint for furt/er &e2elo.*ent.9 ba$eline i$ a $oftware configuration *anage*ent conce.t t/at /el.$ u$ to control c/ange wit/out $eriou$l( i*.e&ing 8u$tifiable c/ange. It i$ &efine& b( IEEE a$6 % specification or a product that has been formally reviewed and agreed upon, that thereafter serves as the basis for further development, and that can be changed only through formal change control procedures. Software Configuration Ite' 6SCI7 9 Software Configuration Ite* i$ t/e infor*ation t/at i$ create& a$ .art of t/e $oftware engineering .roce$$. T(.ical SCI$ inclu&e re'uire*ent $.ecification$% &e$ign $.ecification% $ource co&e% te$t ca$e$ an& recor&e& re$ult$% u$er gui&e$ an& in$tallation *anual$% e5ecutable .rogra*$% an& $tan&ar&$ an& .roce&ure$ Hfor e5a*.le CPP &e$ign gui&eline$J. Software Configuration -anage'ent Ta%(%

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

120

CS605 Software Engineering-II Software configuration *anage*ent ta$4$ inclu&e6 I&entification 0er$ion Control C/ange Control Configuration 9u&iting ,e.orting

VU

I&entification a&&re$$e$ /ow &oe$ an organi+ation i&entif( an& *anage t/e *an( e5i$ting 2er$ion$ of a .rogra* in a *anner t/at will enable c/ange$ to be acco**o&ate& efficientl(L 0er$ion Control tal4$ about /ow &oe$ an organi+ation control c/ange$ before an& after $oftware i$ relea$e& to a cu$to*erL It i$ actuall( a co*bination of .roce&ure$ an& tool$ to *anage &ifferent 2er$ion$ of t/e $oftware configuration. Cle** $tate$ t/at (onfiguration management allows the user to specify alternative configurations of the software system through the selection of the appropriate versions. his is supported by associating with each software version, and then allowing configuration to be specified and constructed by describing the set of desired attributes. 9 2er$ion /a$ *an( &ifferent attribute$. In t/e $i*.le$t for* a $.ecific 2er$ion nu*ber t/at i$ attac/e& to eac/ ob8ect an& in t/e co*.le5 for* it *a( /a2e a $tring of )oolean 2ariable$ H$witc/e$J t/at in&icate $.ecific t(.e$ of functional c/ange$ t/at /a2e been a..lie& to t/e $($te*. T/e C/ange Control .roce$$ a&&re$$e$ t/e i*.ortant 'ue$tion of w/o /a$ t/e re$.on$ibilit( for a..ro2ing an& ran4ing c/ange$. Configuration 9u&iting &eal$ wit/ en$uring t/at t/e c/ange$ /a2e been *a&e .ro.erl( an& finall( ,e.orting tal4$ about t/e *ec/ani$* u$e& to a..ri$e ot/er$ of c/ange$ t/at are *a&e. Configuration I&entification in2ol2e$ i&entification of a tool for SC#. T/en a ba$eline i$ e$tabli$/e& an& i&entifie& w/ic/ i$ t/en u$e& to i&entif( configurable $oftware ite*$. 9t t/e *ini*u*% all &eli2erable$ *u$t be i&entifie& a$ configurable ite*$. T/i$ inclu&e$ &e$ign% $oftware% te$t ca$e$% tutorial$% an& u$er gui&e$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

121

CS605 Software Engineering-II

VU

Lecture No. 35 1roduct 4elea%e Ver%ion Nu'bering S2%te'


3ro&uct relea$e i$ t/e act of *a4ing a .ro&uct a2ailable to it$ inten&e& cu$to*er$. 9fter a .ro&uct /a$ /a& it$ fir$t relea$e% it enter$ a .ro&uct relea$e c(cle. New 2er$ion$ of t/e .ro&uct are *a&e a2ailable t/at *a( fi5 &efect$ or a&& feature$ t/at were not in .re2iou$ relea$e$. T/e$e c/ange$ are categori+e& a$ u.&ate$ or u.gra&e$. 9n u.&ate fi5e$ .ro&uct &efect$. 9n u.gra&e en/ance$ t/e .ro&uct feature $et an& will inclu&e u.&ate$.

4elea%e Nu'bering
Eac/ in&i2i&ual .ro&uct relea$e i$ 2iewe& a$ being in a uni'ue $tate w/ic/ i$ t/e total $et of functionalit( .o$$e$$e& b( t/e .ro&uct relea$e. ,elea$e nu*bering i$ a *ec/ani$* to i&entif( t/e .ro&uct:$ functionalit( $tate. Eac/ relea$e will /a2e a &ifferent .ro&uct $tate an& /ence will /a2e a &ifferent relea$e nu*ber. 9lt/oug/ t/ere i$ no in&u$tr( $tan&ar&% t(.icall(% a t/ree fiel& co*.oun& nu*ber of t/e for*at DM.<.XE i$ u$e&. T/e &ifferent fiel&$ co**unicate functionalit( infor*ation about t/e .ro&uct relea$e. T/e fir$t &igit% M% i$ u$e& for t/e *a8or relea$e nu*ber w/ic/ i$ u$e& to i&entif( a *a8or increa$e in t/e .ro&uct functionalit(. T/e *a8or relea$e nu*ber i$ u$uall( incre*ente& to in&icate a $ignificant c/ange in t/e .ro&uct functionalit( or a new .ro&uct ba$e-line. T/e $econ& &igit% <% $tan&$ for feature relea$e nu*ber. T/e feature relea$e nu*ber i$ iterate& to i&entif( w/en a $et of .ro&uct feature$ /a2e been a&&e& or $ignificantl( *o&ifie& fro* t/eir originall( &ocu*ente& be/a2iour. T/e t/ir& &igit% X% i$ calle& t/e &efect re.air nu*ber an& i$ incre*ente& w/en a $et of &efect$ i$ re.aire&. 7efect re.airO*aintenance i$ con$i&ere& to be an( acti2it( t/at $u..ort$ t/e relea$e functionalit( $.ecification an& it *a( a fi5 for $o*e bug$ or $o*e *aintenance to en/ance t/e .erfor*ance of t/e a..lication. Con2entionall(% a relea$e nu*ber $tart$ wit/ a *a8or nu*ber of one% followe& b( +ero for it$ feature an& *aintenance nu*ber$. T/i$ re$ult$ in a relea$e nu*ber 1.0.0. If t/e fir$t new relea$e t/at i$ nee&e& i$ a &efect re.air relea$e% t/e la$t &igit woul& be iterate& to one% re$ulting in 1.0.1. If two a&&itional &efect re.air relea$e$ are nee&e&% we woul& e2entuall( /a2e a relea$e nu*ber of 1.0.3. 9$$u*e t/at an u.gra&e feature relea$e i$ now nee&e&. ;e will nee& to iterate t/e $econ& fiel& an& will roll bac4 t/e &efect re.air nu*ber to 0% re$ulting in a relea$e nu*ber of 1.1.0. ;/en we iterate t/e *a8or relea$e i&entifier% bot/ t/e feature an& &efect nu*ber$ woul& be re$et bac4 to +ero.

Internal 4elea%e Nu'bering


9 $.ecial t(.e of relea$e i$ internal relea$e. Internal relea$e$ are u$e& b( t/e &e2elo.*ent organi+ation a$ a $taging *ec/ani$* for functionalit(. T/e *o$t co**on internal relea$e$ are t/e regular buil&$. 9 co**on wa( to nu*ber internal buil&$ i$ to u$e t/e $a*e relea$e nu*ber t/at woul& be u$e& for final relea$e wit/ $o*e a&&itional infor*ation a&&e& to it to i&entif( t/e built. It i$ $ugge$te& t/at we a&& an e5tra Hfourt/J fiel& to i&entif( an& 4ee. trac4 of internal buil&$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

122

CS605 Software Engineering-II

VU

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

123

CS605 Software Engineering-II T/e following &iagra* &e.ict$ t/e abo2e *entione& 2er$ion nu*bering $($te*.

VU

.8/8/

.8/8.

.8/80

.8.8/

.8.8.

.808/

First Release

)#date release to fi& defects8 9ased on .8/8/

)#date release to fi& defects8 Can !e !ased on .8/8/ or .8/8.

)#grade release to add features and fi& defects8 can !e !ased on .8/8/' .8/8.' or .8/80

)#date release to fi& defects8 9ased on .8.8/

)#grade release to add features and fi& defects8 can !e !ased on .8.8/ or .8.8.

C!ange control ?a*e$ )ac4 .oint$ out t/e &ifficultie$ relate& to c/ange control a$ follow$6 (hange control is vital. 7ut the forces that make it necessary also make it annoying. ,e worry about change because a tiny perturbation in the code can cause a big failure in the product. 7ut it can also fix a big failure or enable wonderful new capabilities. ,e worry about change because a single rogue developer could sink the pro!ect- yet brilliant ideas originate in the minds of those rogues, and a burdensome change control process could discourage them from doing creative work. T/at i$% li4e all engineering acti2itie$% c/ange control i$ t/e na*e of a balancing act. Too *uc/ or too little c/ange control create$ &ifferent t(.e$ of .roble*$ a$ uncontrolle& c/ange ra.i&l( lea&$ to c/ao$. T/e c/ange control .roce$$ i$ elaborate& in t/e following $ub-$ection.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

124

CS605 Software Engineering-II

VU

Lecture No. 35 C!ange Control 1roce%%


T/e fir$t co*.onent of t/e c/ange control .roce$$ i$ t/e C/ange Control 9ut/orit( HCC9J or a C/ange Control )oar& HCC)J. 9 CC9 or CC) inclu&e$ .eo.le fro* bot/ &e2elo.er an& client $i&e. ;/ene2er a c/ange i$ re'uire&% t/e CC) &eci&e$ w/et/er to allow t/i$ c/ange to /a..en or &en( it. If it i$ &eci&e& t/at a c/ange i$ nee&e&% an Engineering C/ange Ar&er or ECA i$ generate&. 9n ECA &efine$ t/e c/ange to be *a&e% t/e con$traint$ t/at *u$t be re$.ecte&% an& t/e criteria for re2iew an& au&it. T/e c/ange control .roce$$ t/u$ in2ol2e$ t/e following $te.$. 1J 2J 3J 4J 5J 6J nee& for c/ange i$ recogni+e& c/ange re'ue$t fro* u$er &e2elo.er e2aluate$ c/ange re.ort i$ generate& c/ange control aut/orit( HCC9J &eci&e$ Eit/er $te. 6a or 6b i$ .erfor*e&. Ste.$ nu*ber$ ! to 1! are .erfor*e& onl( if $te. 6b i$ .erfor*e&. aJ iJ c/ange re'ue$t i$ &enie& iiJ u$er i$ infor*e& iiiJ no furt/er action i$ ta4en. bJ a$$ign .eo.le to SCI$ !J c/ec4-out SCI$ J *a4e t/e c/ange "J re2iewOau&it t/e c/ange 10J c/ec4-in SCI$ 11J e$tabli$/ a Dba$elineE for te$ting 12J .erfor* S@9 an& te$ting acti2itie$ 13J c/ec4-in t/e c/ange& SCI$ 14J .ro*ote SCI for inclu$ion in ne5t relea$e 15J rebuil& a..ro.riate 2er$ion 16J re2iewOau&it t/e c/ange 1!J inclu&e all c/ange$ in relea$e T/u$% a c/ange i$ incor.orate& in a controlle& an& $trict *anner. C!ec(-in and c!ec(-out In SC#% t/e .roce$$e$ of C/ec4-in an& C/ec4-out ta4e a i*.ortant ele*ent$ of c/ange control an& .ro2i&e acce$$ 9cce$$ control *anage$ w/o /a$ t/e aut/orit( to $(nc/roni+ation control en$ure$ t/at .arallel c/ange$ b( o2erwrite one anot/er. central $tage. T/e$e are two an& $(nc/roni+ation control. c/ec4-out t/e ob8ect an& two &ifferent .eo.le &o not

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

125

CS605 Software Engineering-II

VU

S(nc/roni+ation control i*.le*ent$ a control on u.&ate$. ;/en a co.( i$ c/ec4e&-out% ot/er co.ie$ can be c/ec4e& out for u$e onl( but t/e( cannot be *o&ifie&. In e$$ence% it i*.le*ent$ a $ingle-writer *ulti.le-rea&er$ .rotocol. T/i$ .roce$$ i$ &e.icte& in t/e following &iagra*.

ct je ! o n; n io rsio t a ur "e ig ied f n if t Co od di :m Au fo in

Check( in
unlock

Configuration o!ject :!aseline "ersion;

oft7are engineer

C :e onf &t ig r a ur c t at R ed io C equ lock on e "e n o fig st rs !je io c ur fo n; t at r io n o! Check( je ct out

Access control

*7nershi# info

Project D9

Configuration o!ject :!aseline "ersion;

Configuration #udit Configuration au&it en$ure$ t/at a c/ange /a$ been .ro.erl( i*.le*ente&. It in2ol2e$ for*al tec/nical re2iew$ an& $oftware configuration au&it. Configuration au&it a$$e$$ a configuration ob8ect for c/aracteri$tic$ t/at are generall( not con$i&ere& &uring au&it. It i$ con&ucte& b( t/e S@9 grou.. It loo4$ into t/e following a$.ect$ of t/e c/ange6 >a$ t/e c/ange $.ecifie& in t/e ECA been *a&eL >a2e an( a&&itional *o&ification$ been incor.orate&L >a$ a =T, been con&ucte& to a$$e$$ tec/nical correctne$$L >a$ t/e $oftware .roce$$ been followe&L >a2e t/e SE $tan&ar&$ been .ro.erl( a..lie&L >a$ t/e c/ange been /ig/lig/te& in t/e SCIL o C/ange &ate an& aut/or o >a2e t/e attribute$ of t/e configuration ob8ect been u.&ate&L >a2e t/e SC# .roce&ure$ for noting t/e c/ange% recor&ing it% an& re.orting it been followe&L >a2e all relate& SCI:$ been .ro.erl( u.&ate&L

9n au&it re.ort i$ finall( generate& an& an( non-co*.liance$ are /ig/lig/te& $o t/at t/e( *a( be correcte&.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

126

CS605 Software Engineering-II

VU

Configuration Statu% re*orting 6CS47 Configuration Statu$ ,e.orting HCS,J i$ al$o 4nown a$ $tatu$ accounting. It re.ort$ on t/e following ite*$6 F F F F ;/at /a..ene&L ;/o &i& itL ;/en &i& it /a..enL ;/at el$e will be affecte&L

If it i$ not &one t/en t/e organi+ation face$ t/e left /an& not 4nowing w/at t/e rig/t /an& i$ &oing $(n&ro*e. ;it/out it% if a .er$on re$.on$ible for t/e c/ange lea2e$ for w/ate2er rea$on% it woul& be &ifficult to un&er$tan& t/e w/ole $cenario. CS, re.ort$ are generate& on regular ba$i$. Eac/ ti*e an SCI i$ a$$igne& a new i&entification% a CS, entr( i$ *a&e. Eac/ ti*e a c/ange i$ a..ro2e& b( CC9% a CS, entr( i$ *a&e. 9l$o% eac/ ti*e configuration au&it i$ con&ucte&% t/e re$ult$ are re.orte& a$ .art of CS, ta$4.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

127

CS605 Software Engineering-II

VU

Lecture No. 36 4e&uire'ent -anage'ent and C-C- %tandard% C# $/oul& alwa($ be ba$e& on a $et of $tan&ar&$ w/ic/ are a..lie& wit/in an organi$ation. Stan&ar&$ $/oul& &efine /ow ite*$ are i&entifie&% /ow c/ange$ are controlle& an& /ow new 2er$ion$ are *anage&. Stan&ar&$ *a( be ba$e& on e5ternal C# $tan&ar&$ He.g. IEEE $tan&ar& for C# 9NSIOIEEE St&. No. 2 -1" 3% 1042-1" !% 102 1" J. E5i$ting $tan&ar&$ are ba$e& on a waterfall .roce$$ *o&el - new $tan&ar&$ are nee&e& for e2olutionar( &e2elo.*ent. T!e 4e&uire'ent 1roble' T/e goal of $oftware &e2elo.*ent i$ to &e2elo. 'ualit( $oftware F on ti*e an& on bu&get F t/at *eet$ cu$to*er$: real nee&$. 3ro8ect $ucce$$ &e.en&$ on goo& re'uire*ent *anage*ent. It *a( be recalle& t/at re'uire*ent error$ are t/e *o$t co**on t(.e of $oftware &e2elo.*ent error$ an& t/e *o$t co$tl( to fi5. It *a( al$o be recalle& t/at re'uire*ent error$ are li$te& a$ one of t/e root$ cau$e$ of $oftware .ro8ect failure. 9ccor&ing to a Stan&i$/ Grou. re.ort% lac4 of u$er in.ut i$ re$.on$ible for13B of all .ro8ect failure$C inco*.lete re'uire*ent$ an& $.ecification$ for 12B of all .ro8ect failure$C an& c/anging re'uire*ent$ are re$.on$ible for 12B of all .ro8ect failure$.

T/e abo2e gra./ $/ow$ t/e re$ult of an in&u$tr( $ur2e(. It i$ clear to $ee t/at re'uire*ent $.ecification$ are con$i&ere& to be t/e *o$t $ignificant cau$e of *a8or $oftware .roble*$ b( a *a8orit( of .ractitioner$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

128

CS605 Software Engineering-II

VU

4e&uire'ent -anage'ent ,e'uire*ent *anage*ent i$ al$o one of t/e 5 I39 &efine& at C## le2el 2. ;it/out /a2ing a .ro.er re'uire*ent *anage*ent function% c/ance$ of a .ro8ect:$ $ucce$$ are $li*. ,e'uire*ent$ #anage*ent I39 Goal$ $tate*ent $a($ t/at6 1. T/e $oftware re'uire*ent$ are controlle& to e$tabli$/ a ba$eline for $oftware engineering an& *anage*ent u$e. 2. Software .lan$% .ro&uct$% an& acti2itie$ are 4e.t con$i$tent wit/ t/e $oftware re'uire*ent$. ,e'uire*ent #anage*ent i$ &efine& a$ a $($te*atic a..roac/ to eliciting% organi+ing% an& &ocu*enting t/e re'uire*ent$ of t/e $($te*% an& a .roce$$ t/at e$tabli$/e$ an& *aintain$ agree*ent between t/e cu$to*er an& t/e .ro8ect tea* on t/e c/anging re'uire*ent$ of t/e $($te*. It inclu&e$ e$tabli$/ing an& *aintaining an agree*ent wit/ t/e cu$to*er on t/e re'uire*ent for t/e $oftware .ro8ect. It in2ol2e$ 7efining t/e re'uire*ent ba$eline ,e2iewing .ro.o$e& re'uire*ent c/ange$ an& e2aluating t/e li4el( i*.act of eac/ .ro.o$e& c/ange before &eci&ing w/et/er to a..ro2e it Incor.orating a..ro2e& re'uire*ent c/ange$ in t/e .ro8ect in a controlle& *anner Iee.ing .ro8ect .lan$ current wit/ t/e re'uire*ent$ Negotiating new co**it*ent$ ba$e& on e$ti*ate& i*.act on c/ange& re'uire*ent$ Tracing in&i2i&ual re'uire*ent$ to t/eir corre$.on&ing &e$ign% $ource co&e% an& te$t ca$e$ Trac4ing re'uire*ent $tatu$ an& c/ange acti2it( t/roug/out t/e .ro8ect 4e&uire'ent #ttribute% ;e nee& to tag re'uire*ent$ wit/ certain attribute$ in or&er to *anage t/e* in an or&erl( fa$/ion. 9ttribute$ are u$e& to e$tabli$/ a conte5t an& bac4groun& for eac/ re'uire*ent. T/e( go be(on& t/e &e$cri.tion of inten&e& functionalit(. T/e( can be u$e& to filter% $ort% or 'uer( to 2iew $electe& $ub$et of t/e re'uire*ent$. 9 li$t of .o$$ible attribute$ i$ enu*erate& a$ below6 1. 2. 3. 4. 5. 6. !. . ". ,e'uire*ent I7 Creation &ate Create& b( La$t *o&ifie& on La$t *o&ifie& b( 0er$ion nu*ber Statu$ Arigin Sub$($te*

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

129

CS605 Software Engineering-II 10. 3ro&uct ,elea$e 11. 3riorit( 4e&uire'ent Statu%

VU

T/e re'uire*ent $tatu$ attribute i$ one of t/e *o$t u$eful one$. It can be u$e& to 4ee. trac4 of &ifferent re'uire*ent$ going t/roug/ &ifferent ./a$e$. T/e .o$$ible $tatu$ 2alue$ are .ro.o$e&% a..ro2e&% i*.le*ente&% 2erifie&% an& &elete&. T/e$e are elaborate& in t/e following .aragra./$. 1. 3ro.o$e&6 T/e re'uire*ent /a$ been re'ue$te& b( a $ource w/o /a$ t/e aut/orit( to .ro2i&e re'uire*ent$. 2. 9..ro2e&6 T/e re'uire*ent /a$ been anal(+e&% it$ i*.act on t/e re$t of t/e .ro8ect /a$ been e$ti*ate&% an& it /a$ been allocate& to t/e ba$eline for a $.ecific buil& nu*ber or .ro&uct relea$e. T/e $oftware &e2elo.*ent grou. /a$ co**itte& to i*.le*ent t/e re'uire*ent. 3. I*.le*ente&6 T/e co&e t/at i*.le*ent$ t/e re'uire*ent /a$ been &e$igne&% written% an& unit te$te&. 4. 0erifie&6 T/e i*.le*ente& re'uire*ent /a$ been 2erifie& t/roug/ t/e $electe& a..roac/% $uc/ a$ te$ting or in$.ection. T/e re'uire*ent /a$ been trace& to .ertinent te$t ca$e$. T/e re'uire*ent i$ now con$i&ere& co*.lete. 5. 7elete&6 9 .lanne& re'uire*ent /a$ been &elete& fro* t/e ba$eline. Inclu&e an e5.lanation of w/( an& b( w/o* t/e &eci$ion wa$ *a&e to &elete t/e re'uire*ent. C!ange 4e&ue%t Statu% 9$ t/e re'uire*ent go t/roug/ &ifferent ./a$e$% t/eir $tatu$ i$ u.&ate& accor&ingl(. T/e following $tate tran$ition &iagra* ca.ture$ t/e $e'uence of re'uire*ent $tatu$ c/ange$.
*riginator su!mits su!mitted a change request 4"aluator CC9 decided #erformed not to 4"aluated Rejected im#act make the analysis change Change A##ro"ed A##ro"ed Change 7as canceled

,erification failed

Modifier has made the change and requested for "erification

Canceled

Change 7as Change Made Modifier has installed the canceled #roduct ,erifier has confirmed Closed the change Change 7as Modifier has installed the ,erified #roduct canceled

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

130

CS605 Software Engineering-II

VU

T/e c/ange$ in t/e re'uire*ent $tatu$ can be .lotte& a$ $/own below to get an i&ea of t/e $tabilit( of t/e re'uire*ent$ an& t/e .rogre$$ of t/e .ro8ect. It i$ ea$( to $ee t/at it i$ nor*al to /a2e un$table re'uire*ent$ in t/e beginning but if t/e( re'uire*ent$ $ta(e& 2olatile till t/e en& t/en t/e .rogre$$ woul& be $low.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

131

CS605 Software Engineering-II

VU

-anaging Sco*e Cree* ;e *u$t alwa($ re*e*ber t/at re'uire*ent$ will c/ange% no *atter w/at . T/at *ean$ we /a2e to be able to *anage c/anging re'uire*ent$. Software organi+ation$ an& .rofe$$ional$ *u$t learn to *anage c/anging re'uire*ent$. 9 *a8or i$$ue in re'uire*ent$ engineering i$ t/e rate at w/ic/ re'uire*ent$ c/ange once t/e re'uire*ent$ ./a$e /a$ Dofficiall(E en&e&. ;e t/erefore nee& to tr( to ta4e it to a *ini*u* le2el. =or t/at we nee& to *ea$ure t/e c/ange acti2it(.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

132

CS605 Software Engineering-II

VU

Lecture No. 3> -ea%uring C!ange #cti,it2


#ea$ure*ent of c/ange acti2it( i$ a wa( to a$$e$$ t/e $tabilit( of t/e re'uire*ent$ an& to i&entif( o..ortunitie$ for .roce$$ i*.ro2e*ent. In t/i$ regar&$% t/e following coul& be *ea$ure& T/e nu*ber of c/ange re'ue$t$ recei2e&% o.en% an& clo$e& T/e cu*ulati2e nu*ber of c/ange$ *a&e inclu&ing a&&e&% &elete&% an& *o&ifie& re'uire*ent$ T/e nu*ber of c/ange re'ue$t$ t/at originate& fro* eac/ $ource T/e nu*ber of c/ange$ .ro.o$e& an& *a&e in eac/ re'uire*ent $ince it wa$ ba$eline& T/e total effort &e2ote& to /an&ling c/ange$ T/e$e can t/en be .lotte& a$ $/own in t/e gra./$ below to get an i&ea of t/e $tabilit( of t/e $($te*$. It i$ i*.ortant to note t/at t/e $ooner t/e re'uire*ent$ co*e to a $table $tate after e$tabli$/ing t/e ba$eline t/e better it i$ for t/e .ro8ect. It i$ al$o u$eful to trac4 t/e $ource of t/e re'uire*ent c/ange$ $o t/at .roce$$e$ go2erning t/o$e area$ cau$ing *ore fre'uent c/ange$ *a( be $trengt/ene& in future .ro8ect$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

133

CS605 Software Engineering-II

VU

4e&uire'ent Traceabilit2 ,e'uire*ent traceabilit( i$ a 2er( i*.ortant con$i&eration for re'uire*ent *anage*ent. It i$ reall( /ar& to *anage re'uire*ent$ t/at are not traceable. 9 Software ,e'uire*ent S.ecification HS,SJ i$ trace& if t/e origin of it$ re'uire*ent$ i$ clear. T/at *ean$ t/at t/e S,S inclu&e$ reference$ to earlier $u..orti2e &ocu*ent$. 9n S,S i$ traceable if it written in a *anner t/at facilitate$ t/e referencing of eac/ in&i2i&ual re'uire*ent $tate& t/erein. It i$ i*.ortant to trace re'uire*ent$ bot/ wa($. T/at i$ fro* origin of a re'uire*ent to /ow it i$ i*.le*ente&. T/i$ i$ a continuou$ .roce$$. It i$ al$o i*.ortant t/at t/e rationale of re'uire*ent$ *u$t al$o be trace&. Traceabilit( i$ i*.ortant for t/e .ur.o$e$ of certification% c/ange i*.act anal($i$% *aintenance% .ro8ect trac4ing% reengineering% reu$e% ri$4 re&uction% an& te$ting. T/at i$ it .la($ an i*.ortant role in al*o$t e2er( a$.ect of t/e .ro8ect an& it$ life c(cle.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

134

CS605 Software Engineering-II

VU

Lecture No. 3? Legac2 %2%te'%


9 $($te* i$ con$i&ere& to be a legac( $($te* if it /a$ been in o.eration for *an( (ear$. 9 legac( $($te* /a$ *an( co*.onent$. T/e$e inclu&e bu$ine$$ .roce$$e$% bu$ine$$ rule$% a..lication $oftware% a..lication &ata% $u..ort $oftware% an& $($te* /ar&ware. T/e relation$/i. a*ong t/e$e co*.onent$ i$ $/own in t/e following &iagra*.
u##ort oft7are
Runs on uses

A##lication oft7are
uses

4m!eds kno7ledge of

9usiness Rules
Constrains

Runs on

uses

ystem <ard7are

A##lication Data

9usiness Processes

-aintaining Legac2 S2%te' #aintaining legac( $($te* i$ e5.en$i2e. It i$ often t/e ca$e t/at &ifferent .art$ of t/e $($te* /a2e been i*.le*ente& b( &ifferent tea*$% lac4ing con$i$tenc(. 3art or all of t/e $($te* *a( be i*.le*ente& u$ing an ob$olete language. In *o$t ca$e$ $($te* &ocu*entation i$ ina&e'uate an& out of &ate. In $o*e ca$e$ t/e onl( &ocu*entation i$ t/e $ource co&e. In $o*e ca$e$ e2en t/e $ource co&e i$ not a2ailable. #an( (ear$ of *aintenance /a2e u$uall( corru.te& t/e $($te* $tructure% *a4ing it increa$ingl( &ifficult to un&er$tan&. T/e &ata .roce$$e& b( t/e $($te* *a( be *aintaine& in &ifferent file$ w/ic/ /a2e inco*.atible $tructure$. T/ere *a( be &ata &u.lication an& t/e &ocu*entation of t/e &ata it$elf *a( be out of &ate% inaccurate% an& inco*.lete. 9$ far a$ t/e $($te* /ar&ware i$ concerne&% t/e /ar&ware .latfor* *a( be out&ate& an& i$ /ar& to *aintain. In *an( ca$e$% t/e legac( $($te*$ /a2e been written for *ainfra*e /ar&ware w/ic/ i$ no longer a2ailable% e5.en$i2e to *aintain% an& not be co*.atible wit/ current organi+ational IT .urc/a$ing .olicie$. Su..ort $oftware inclu&e$ AS% &ataba$e% an& co*.iler etc. Li4e /ar&ware% it *a( be ob$olete an& no longer $u..orte& b( t/e 2en&or$. 9 ti*e t/erefore co*e$ w/en an organi+ation /a$ to *a4e t/i$ &eci$ion w/et/er to 4ee. t/e ol& legac( $($te* or to *o2e it to new .latfor* an& en2iron*ent. #o2ing it to new en2iron*ent i$ 4nown a$ legac( $($te* *igration.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

135

CS605 Software Engineering-II

VU

Legac2 'igration ri%(% Legac( $($te* *igration /owe2er i$ not an ea$( ta$4 an& t/ere are a nu*ber of ri$4$ in2ol2e& t/at nee& to be *itigate&. =ir$t of all% t/ere i$ rarel( a co*.lete $.ecification of t/e $($te* a2ailable. T/erefore% t/ere i$ no $traig/t forwar& wa( of $.ecif(ing t/e $er2ice$ .ro2i&e& b( a legac( $($te*. T/u$% i*.ortant bu$ine$$ rule$ are often e*be&&e& in t/e $oftware an& *a( not be &ocu*ente& el$ew/ere. )u$ine$$ .roce$$e$ an& t/e wa( legac( $($te*$ o.erate are often intertwine&. New $oftware &e2elo.*ent *a( ta4e $e2eral (ear$. New $oftware &e2elo.*ent i$ it$elf ri$4( a$ c/ange$ to one .art of t/e $($te* ine2itabl( in2ol2e furt/er c/ange$ to ot/er co*.onent$. ;e t/erefore nee& to a$$e$$ a legac( $($te* before a &eci$ion for *igration i$ *a&e. Legac2 S2%te' #%%e%%'ent =or eac/ legac( $($te*% t/ere are four $trategic o.tion$6 1. Scra. t/e $($te* co*.letel(6 T/i$ i$ t/e ca$e w/en $($te* i$ not *a4ing an effecti2e contribution to bu$ine$$ .roce$$e$ an& bu$ine$$ .roce$$e$ /a2e c/ange& $ignificantl( an& t/e organi+ation i$ no longer co*.letel( &e.en&ent u.on t/e $($te*. 2. Continue *aintaining t/e $($te*6 T/i$ o.tion i$ u$e& w/en $($te* i$ $till re'uire&% it i$ $table% an& re'uire*ent$ are not c/anging fre'uentl( 3. Tran$for* t/e $($te* in $o*e wa( to i*.ro2e it$ *aintainabilit(6 t/i$ o.tion i$ e5erci$e& w/en $($te* 'ualit( /a$ been &egra&e& an& regular c/ange$ to t/e $($te* are re'uire&. 4. ,e.lace t/e $($te* wit/ a new $($te*6 t/i$ .at/ i$ ta4en w/en ol& $($te* cannot continue in o.eration an& off-t/e $/elf alternati2e i$ a2ailable or $($te* can be &e2elo.e& at a rea$onable co$t. =or t/e$e &eci$ion$% a legac( $($te* can be a$$e$$e& fro* two &ifferent .er$.ecti2e$ F bu$ine$$ 2alue an& 'ualit(. T/e following four 'ua&rant a$$e$$*ent *atri5 can be u$e& for t/i$ .ur.o$e.

9usiness ,alue

$Im#ortant for !usiness $Cannot !e scra##ed $6o7 quality means high o#erational cost $Candidates for system transformation or re#lacement $=ee#ing these systems in o#eration 7ill !e e&#ensi"e $Rate of return to the !usiness is small $Candidates for scra##ing

$Must !e ke#t in !usiness $<igh quality means lo7 cost of maintenance $%ot necessary to transform or re#lace $Continue normal o#eration $6o7 !usiness "alue !ut not "ery e&#ensi"e to maintain $%ot 7orth the risk of re#lacing them $ hould !e normally maintained or scra##ed

6o7

<igh

6o7
- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan Quality

<igh
136

CS605 Software Engineering-II

VU

"u%ine%% Value #%%e%%'ent It i$ i*.ortant to note t/at t/i$ i$ a $ub8ecti2e 8u&g*ent an& re'uire$ &ifferent bu$ine$$ 2iew.oint$. T/e$e 2iew .oint$ inclu&e en&-u$er$% cu$to*er$% line *anager$% IT *anager$% an& $enior *anager$. En& 1$er$ a$$e$$ t/e $($te* fro* t/e .er$.ecti2e of /ow effecti2e &o t/e( fin& t/e $($te* in $u..orting t/eir bu$ine$$ .roce$$e$ an& /ow *uc/ of t/e $($te* functionalit( i$ u$e&. T/e cu$to*er$ loo4 at t/e $($te* an& a$4 i$ t/e u$e of t/e $($te* tran$.arent to cu$to*er or are t/eir interaction con$traine& b( t/e $($te*% are t/e( 4e.t waiting becau$e of t/e $($te*% an& &o $($te* error$ /a2e a &irect i*.act on t/e cu$to*er. =ro* an IT #anager:$ .er$.ecti2e t/e following 'ue$tion$ nee& to be a$4e&6 9re t/ere &ifficultie$ in fin&ing .eo.le to wor4 on t/e $($te*L 7oe$ t/e $($te* con$u*e re$ource$ w/ic/ coul& be &e.lo(e& *ore effecti2el( on ot/er $($te*$L Line #anager$ a$46 &o *anager$ t/in4 t/at t/e $($te* i$ effecti2e in contributing to $ucce$$ of t/eir unitL I$ t/e co$t of 4ee.ing t/e $($te* in u$e 8u$tifie&L I$ t/e &ata *anage& b( t/e $($te* critical for t/e functioning of t/e *anager:$ unitL Senior #anager$ loo4 at t/e $($te* fro* t/e angle t/at &oe$ t/e $($te* an& a$$ociate& bu$ine$$ .roce$$ *a4e an effecti2e contribution to t/e bu$ine$$ goalL

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

137

CS605 Software Engineering-II

VU

Lecture No. 3B En,iron'ent #%%e%%'ent


T/e legac( $($te* al$o nee&$ to be a$$e$$e& fro* an en2iron*ent:$ .er$.ecti2e. T/i$ in2ol2e$ loo4ing at t/e $u..lier% failure rate% age% .erfor*ance% $u..ort re'uire*ent$% *aintenance co$t% an& intero.erabilit(. T/e$e angle$ are elaborate& in t/e following .aragra./6 Su..lier $tabilit(6 I$ t/e $u..lier $till in e5i$tenceL I$ t/e $u..lier financiall( $table an& li4el( to continue in e5i$tenceL If t/e $u..lier i$ no longer in bu$ine$$% i$ t/e $($te* *aintaine& b( $o*eone el$eL =ailure rate6 7oe$ t/e /ar&ware /a2e a /ig/ rate of re.orte& failureL 7oe$ t/e $u..ort $oftware cra$/ often an& force $($te* re$tart$L 9ge6 >ow ol& i$ t/e /ar&ware an& $oftwareL 3erfor*ance6 I$ t/e .erfor*ance of t/e $($te* a&e'uateL 7o .erfor*ance .roble*$ /a2e a $ignificant effect on $($te* u$er$L Su..ort re'uire*ent$6 ;/at local $u..ort i$ re'uire& b( /ar&ware an& $oftwareL If t/ere are /ig/ co$t$ a$$ociate& wit/ t/i$ $u..ort% it *a( be wort/ con$i&ering $($te* re.lace*entL #aintenance Co$t6 ;/at are t/e co$t$ of /ar&ware *aintenance an& $oftware licen$e$L Intero.erabilit(6 9re t/ere .roble*$ interfacing t/e $($te* wit/ ot/er $($te*$L Can co*.iler$ etc be u$e& wit/ current 2er$ion$ of t/e o.erating $($te*L I$ $($te* e*ulation re'uire&L #**lication %oftware a%%e%%'ent T/e a..lication $oftware i$ a$$e$$e& on t/e following .ara*eter$6 1n&er$tan&abilit(6 >ow &ifficult i$ it to un&er$tan& t/e $oftware co&e of t/e current $($te*L >ow co*.le5 are t/e control $tructure$ t/at are u$e&L 7ocu*entation6 ;/at $($te* &ocu*entation i$ a2ailableL I$ t/e &ocu*entation co*.lete% con$i$tent% an& u.-to-&ateL 7ata6 I$ t/ere an e5.licit &ata *o&el for t/e $($te*L To w/at e5tent i$ &ata &u.licate& in &ifferent file$L

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

138

CS605 Software Engineering-II

VU

3rogra**ing Language6 9re *o&ern co*.iler$ a2ailable for t/e .rogra**ing languageL I$ t/e language $till u$e& for new $($te* &e2elo.*entL Te$t 7ata6 7oe$ te$t &ata for t/e $($te* e5i$tL I$ t/ere a recor& of regre$$ion te$t$ carrie& out w/en new feature$ /a2e been a&&e& to t/e $($te*L 3er$onnel $4ill$6 9re t/ere .eo.le a2ailable w/o /a2e t/e $4ill$ to *aintain t/e $($te*L 9$ *igration i$ a 2er( co$tl( an& ri$4( bu$ine$$% t/e &eci$ion to *igrate t/e $($te* i$ *a&e after a$$e$$ing it fro* all t/e$e angle$ an& it i$ &eter*ine& t/at t/e ti*e /a$ co*e to *igrate t/i$ $($te* an& it i$ wort/ $.en&ing t/e re'uire& a*ount of *one( an& ti*e for un&erta4ing t/at effort. Software 4eengineering Software $olution$ often auto*ate t/e bu$ine$$ b( i*.le*enting bu$ine$$ rule$ an& bu$ine$$ .roce$$e$. In *an( ca$e$% t/e $oftware *a4e$ t/e bu$ine$$ .roce$$e$. 9$ t/e$e rule$ an& .roce$$e$ c/ange% t/e $oftware *u$t al$o c/ange. 9 ti*e co*e$ w/en t/e$e c/ange$ beco*e 2er( &ifficult to /an&le. So reengineering i$ re-i*.le*enting legac( $($te*$ to *a4e t/e* *ore *aintainable. It i$ a long ter* acti2it(. Software 4eengineering 1roce%% -odel T/e $oftware reengineering i$ a non-tri2ial acti2it(. ?u$t li4e legac( *igration% careful anal($i$ *u$t be carrie& out before a &eci$ion for reengineering i$ ta4en. T/e following .roce$$ *o&el can be u$e& to reengineer a legac( $($te*.

/or3ard 6ngineering

Inventor! anal!sis

Data restructuring

Document restructuring

Code restructuring

.everse engineering

In,entor2 anal2%i% In2entor( anal($i$ i$ t/e fir$t $te. in t/e reengineering .roce$$. 9t t/i$ $tage% in2entor( of all a..lication$ i$ ta4en a note of t/eir $i+e% age% bu$ine$$ criticalit(% an& current *aintainabilit( i$ *a&e. In2entor( $/oul& be u.&ate& regularl( a$ t/e $tatu$ of t/e a..lication can c/ange a$ a function of ti*e.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

139

CS605 Software Engineering-II

VU

+ocu'ent re%tructuring T/e ne5t $te. in t/e reengineering .roce$$ i$ &ocu*ent re$tructuring. ;ea4 &ocu*entation i$ a tra&e*ar4 of *an( legac( a..lication$. ;it/out .ro.er &ocu*entation% t/e /i&&en rule$% bu$ine$$ .roce$$e$% an& &ata cannot be ea$il( un&er$too& an& reengineere&. In t/i$ regar&$% t/e following o.tion$ are a2ailable6 1. Create &ocu*entation6 Creating &ocu*entation fro* $cratc/ i$ 2er( ti*e con$u*ing. If .rogra* i$ relati2el( $table an& i$ co*ing to t/e en& of it$ u$eful life t/en 8u$t lea2e it a$ it i$. 2. 1.&ate &ocu*entation6 T/i$ o.tion al$o nee&$ a lot of re$ource$. 9 goo& a..roac/ woul& be to u.&ate &ocu*entation w/en t/e co&e i$ *o&ifie&. 4e,er%e engineering ,e2er$e engineering i$ t/e ne5t $te. in t/e .roce$$. ,e2er$e engineering for $oftware i$ a .roce$$ for anal(+ing a .rogra* in an effort to create a re.re$entation of t/e .rogra* at a /ig/er le2el of ab$traction t/an t/e $ource co&e. ,e2er$e engineering i$ t/e .roce$$ of &e$ign reco2er(. 9t t/i$ $tage% &ocu*entation of t/e o2erall functionalit( of t/e $($te* t/at i$ not t/ere i$ create&. T/e o2erall functionalit( of t/e entire $($te* *u$t be un&er$too& before *ore &etaile& anal($i$ can be carrie& out. ,e2er$e engineering acti2itie$ inclu&e6 ,e2er$e engineering to un&er$tan& .roce$$ing ,e2er$e engineering to un&er$tan& &ata F Internal &ata $tructure$ F 7ataba$e $tructure$ ,e2er$e engineering u$er interface$ 1rogra' 4e%tructuring 3rogra* i$ re$tructure& after t/e re2er$e engineering ./a$e. In t/i$ ca$e we *o&if( $ource co&e an& &ata in or&er to *a4e it a*enable to future c/ange$. T/i$ inclu&e$ co&e a$ well a$ &ata re$tructuring. Co&e re$tructuring re'uire$ re&e$ign wit/ $a*e function wit/ /ig/er 'ualit( t/an original .rogra* an& &ata re$tructuring in2ol2e$ re$tructuring t/e &ataba$e or t/e &ataba$e $c/e*a. It *a( al$o in2ol2e co&e re$tructuring.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

140

CS605 Software Engineering-II

VU

Lecture No. 50 .orward Engineering


9t t/e en& forwar& engineering i$ carrie& out. It *ean$ incor.orating t/e new bu$ine$$ .roce$$e$ an& rule$ in t/e $($te*. =orwar& engineering re'uire$ a..lication of SE .rinci.le$% *et/o&$% an& conce.t$ to re-create an e5i$ting a..lication. In *o$t ca$e$ forwar& engineering &oe$ not $i*.l( create a *o&ern e'ui2alent of an ol&er .rogra*% rat/er new u$er an& tec/nolog( re'uire*ent$ are integrate& into t/e reengineering effort. T!e Econo'ic% of 4eengineering 9$ reengineering i$ a co$tl( an& ri$4( un&erta4ing% a co$t benefit anal($i$ for t/e reengineering effort *u$t be carrie& out. T/i$ anal($i$ i$ carrie& out in t/e following *anner. Let 31 < current annual *aintenance co$t for an a..lication 32 < current annual o.eration co$t for an a..lication 33 < current annual bu$ine$$ 2alue of an a..lication 34 < .re&icte& annual *aintenance co$t after reengineering 35 < .re&icte& annual o.eration$ co$t after reengineering 36 < .re&icte& annual bu$ine$$ 2alue co$t after reengineering 3! < e$ti*ate& reengineering co$t 3 < e$ti*ate& reengineering calen&ar ti*e 3" < reengineering ri$4 factor H1.0 i$ no*inalJ L < e5.ecte& life of t/e $($te* Now t/e co$t of *aintenance i$ calculate& a$6 C 'aintenance G H13 E 611 I 107J ) L Co$t of reengineering woul& t/en be gi2en b( t/e for*ula6 C reengineering G H16 E 615 I 157 ) 6L E 1?7 E 61> ) 1B7J

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

141

CS605 Software Engineering-II

VU

Lecture No. 51 "u%ine%% 1roce%% 4eengineering


9 conce.t $i*ilar to $oftware reengineering i$ of bu$ine$$ .roce$$ reengineering H)3,J. 9 bu$ine$$ .roce$$ i$ Da $et of logicall( relate& ta$4$ .erfor*e& to ac/ie2e a &efine& bu$ine$$ outco*eE. It i$ t/e wa( certain bu$ine$$ i$ con&ucte&. 3urc/a$ing $er2ice$ an& $u..lie$% /iring new e*.lo(ee$% .a(ing $u..lier$ are e5a*.le$ of bu$ine$$ .roce$$e$. =or )3, t/e following .roce$$ *o&el *a( be u$e&.
9usiness definition Refinement > instantiation Process Identification

Prototy#ing

Process #ecification

Process 4"aluation

9$ ob2iou$ fro* t/e &iagra*% it $tart$ wit/ t/e bu$ine$$ &efinition w/ere bu$ine$$ goal$ are i&entifie&. T/e 4e( &ri2er$ coul& be co$t re&uction% ti*e re&uction% 'ualit( i*.ro2e*ent% an& .er$onnel &e2elo.*ent an& e*.ower*ent. It *a( be &efine& at t/e bu$ine$$ le2el or for a $.ecific co*.onent of t/e bu$ine$$. T/e ne5t $te. i$ .roce$$ i&entification. 9t t/i$ ti*e .roce$$e$ t/at are critical to ac/ie2ing t/e goal$ are i&entifie& an& are ran4e& b( i*.ortance% an& nee& for c/ange. T/e $/ort li$te& .roce$$e$ are t/en e2aluate&. E5i$ting .roce$$ i$ anal(+e& an& *ea$ure& an& .roce$$ ta$4$ are i&entifie&. T/e co$t an& ti*e con$u*e& i$ *ea$ure& a$ well a$ t/e 'ualit( an& .erfor*ance .roble*$ are i&entifie&. T/en% .roce$$ $.ecification an& &e$ign i$ carrie& out. 1$e ca$e$ are .re.are& for eac/ .roce$$ to be re&e$igne& an& a new $et of ta$4$ are &e$igne& for t/e .roce$$e$ an& t/en t/e( are .rotot(.e&. 9 re&e$igne& bu$ine$$ .roce$$ *u$t be .rotot(.e& before it i$ full( integrate& into t/e bu$ine$$. )a$e& on t/e fee&bac4 t/e bu$ine$$ .roce$$ i$ refine&.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

142

CS605 Software Engineering-II

VU

Lecture No. 50 Software 4efactoring


Software refactoring i$ t/e .roce$$ of c/anging a $oftware $($te* $uc/ t/at t/e e5ternal be/a2ior of t/e $($te* &oe$ not c/ange w/ile t/e internal $tructure of t/e $($te* i$ i*.ro2e&. T/i$ i$ $o*eti*e$ calle& DI*.ro2ing t/e &e$ign after it /a$ been writtenE. =owler &efine$ refactoring a$ 9 c/ange *a&e to t/e internal $tructure of $oftware to *a4e it ea$ier to un&er$tan& an& c/ea.er to *o&if( wit/out c/anging it$ ob$er2able be/a2ior. It i$ ac/ie2e& b( a..l(ing a $erie$ of refactoring$ wit/out c/anging it$ ob$er2able be/a2ior. # 6Ver27 Si'*le E)a'*le Let u$ con$i&er a 2er( $i*.le e5a*.le. T/e refactoring in2ol2e& in t/i$ ca$e i$ 4nown a$ DCon$oli&ate 7u.licate Con&itional =rag*ent$E. 9$ t/e na*e $ugge$t$% t/i$ refactoring let$ t/e .rogra**er i*.ro2e t/e 'ualit( of t/e co&e b( grou.ing toget/er t/e &u.licate co&e% re$ulting in le$$ *aintenance afterwar&$. if Hi$S.ecial7ealHJJ c total Z .rice T 0."5C $en& HJC d el$e c total Z .rice T 0." C $en& HJC d In t/i$ ca$e% send i$ being calle& fro* &ifferent .lace$. ;e can con$oli&ate a$ follow$6 if Hi$S.ecial7ealHJJ total Z .rice T 0."5C el$e total Z .rice T 0." C $en& HJC It can furt/er be i*.ro2e& if we calculate total out$i&e t/e if $tate*ent a$ $/own below. if Hi$S.ecial7ealHJJ factor Z 0."5C el$e factor Z 0." C total Z .rice T factorC $en& HJC 9lt/oug/ t/i$ i$ a tri2ial e5a*.le% it ne2ert/ele$$ i$ u$eful an& teac/e$ u$ /ow can be con$oli&ate co&e b( grou.ing toget/er .iece$ of co&e fro* &ifferent $eg*ent$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

143

CS605 Software Engineering-II

VU

4efactoring<

!ere to Start=

T/e fir$t 'ue$tion t/at we /a2e to a$4 our$el2e$ i$6 /ow &o (ou i&entif( co&e t/at nee&$ to be refactore&L =owler et al /a$ &e2i$e& a /euri$tic ba$e& a..roac/ to t/i$ en& 4nown a$ D)a& S*ell$E in Co&e. T/e ./ilo$o./( i$ $i*.le6 &i# it stin's, change it() "ad S'ell% in Code T/e( /a2e i&entifie& *an( &ifferent t(.e$ of Dba& $*ell$E. T/e$e are briefl( &e$cribe& in t/e following .aragra./$6 7u.licate& Co&e F ba& becau$e if (ou *o&if( one in$tance of &u.licate& co&e but not t/e ot/er$% (ou H*a(J /a2e intro&uce& a bugR Long #et/o& F long *et/o&$ are *ore &ifficult to un&er$tan&C .erfor*ance concern$ wit/ re$.ect to lot$ of $/ort *et/o&$ are largel( ob$olete Large Cla$$ F Large cla$$e$ tr( to &o too *uc/% w/ic/ re&uce$ co/e$ion Long 3ara*eter Li$t F /ar& to un&er$tan&% can beco*e incon$i$tent 7i2ergent C/ange F 7eal$ wit/ co/e$ionC $(*.to*6 one t(.e of c/ange re'uire$ c/anging one $ub$et of *et/o&$C anot/er t(.e of c/ange re'uire$ c/anging anot/er $ub$et S/otgun Surger( F a c/ange re'uire$ lot$ of little c/ange$ in a lot of &ifferent cla$$e$ =eature En2( F 9 *et/o& re'uire$ lot$ of infor*ation fro* $o*e ot/er cla$$ H*o2e it clo$erRJ 7ata Clu*.$ F attribute$ t/at clu*. toget/er but are not .art of t/e $a*e cla$$ 3ri*iti2e Ab$e$$ion F c/aracteri+e& b( a reluctance to u$e cla$$e$ in$tea& of .ri*iti2e &ata t(.e$ Switc/ State*ent$ F Switc/ $tate*ent$ are often &u.licate& in co&eC t/e( can t(.icall( be re.lace& b( u$e of .ol(*or./i$* Hlet AA &o (our $election for (ouRJ 3arallel In/eritance >ierarc/ie$ F Si*ilar to S/otgun Surger(C eac/ ti*e I a&& a $ubcla$$ to one /ierarc/(% I nee& to &o it for all relate& /ierarc/ie$ La+( Cla$$ F 9 cla$$ t/at no longer D.a($ it$ wa(E. e.g. *a( be a cla$$ t/at wa$ &own$i+e& b( refactoring% or re.re$ente& .lanne& functionalit( t/at &i& not .an out S.eculati2e Generalit( F DA/ I t/in4 we nee& t/e abilit( to &o t/i$ 4in& of t/ing $o*e&a(E Te*.orar( =iel&

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

144

CS605 Software Engineering-II F

VU

9n attribute of an ob8ect i$ onl( $et in certain circu*$tance$C but an ob8ect $/oul& nee& all of it$ attribute$ #e$$age C/ain$ F a client a$4$ an ob8ect for anot/er ob8ect an& t/en a$4$ t/at ob8ect for anot/er ob8ect etc. )a& becau$e client &e.en&$ on t/e $tructure of t/e na2igation #i&&le #an F If a cla$$ i$ &elegating *ore t/an /alf of it$ re$.on$ibilitie$ to anot/er cla$$% &o (ou reall( nee& itL Ina..ro.riate Inti*ac( F 3air$ of cla$$e$ t/at 4now too *uc/ about eac/ ot/er:$ .ri2ate &etail$ 9lternati2e Cla$$e$ wit/ 7ifferent Interface$ F S(*.to*6 Two or *ore *et/o&$ &o t/e $a*e t/ing but /a2e &ifferent $ignature for w/at t/e( &o Inco*.lete Librar( Cla$$ F 9 fra*ewor4 cla$$ &oe$n:t &o e2er(t/ing (ou nee& 7ata Cla$$ F T/e$e are cla$$e$ t/at /a2e fiel&$% getting an& $etting *et/o&$ for t/e fiel&$% an& not/ing el$eC t/e( are &ata /ol&er$% but ob8ect$ $/oul& be about &ata 9N7 be/a2ior ,efu$e& )e'ue$t F 9 $ubcla$$ ignore$ *o$t of t/e functionalit( .ro2i&e& b( it$ $u.ercla$$ Co**ent$ HRJ F Co**ent$ are $o*eti*e$ u$e& to /i&e ba& co&e F Deco**ent$ often are u$e& a$ a &eo&orantE HRJ

"rea(ing a -et!od ;e /a2e alrea&( $een e5a*.le of &u.licate co&e. ;e now loo4 at anot/er $i*.le e5a*.le of long *et/o&. 9lt/oug/% in t/i$ ca$e% t/e co&e i$ not reall( long% it /owe2er &e*on$trate$ /ow longer $eg*ent$ of co&e can be bro4en into $*aller an& *ore *anageable H*a( be *ore reu$able a$ wellJ co&e $eg*ent$. T/e following co&e $eg*ent $ort$ an arra( of integer$ u$ing D$election $ortE algorit/*. for HiZ0C i ^ N-1C iPPJ c *in Z iC for H8 Z iC 8 ^ NC 8PPJ if Ha\8] ^ a\*in]J *in Z 8C te*. Z a\i]C a\i] Z a\*in]C a\*in] Z te*.C d

;e brea4 it into $*aller frag*ent$ b( *a4ing $*aller function$ out of &ifferent $te.$ in t/e algorit/* a$ follow$6

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

145

CS605 Software Engineering-II int *ini*u* Hint a\ ]% int fro*% int toJ c int *in Z fro*C for Hint i Z fro*C i ^Z toC iPPJ if Ha\i] ^ a\*in]J *in Z iC return *inC d 2oi& $wa. Hint f5% int f(J c int te*. Z 5C 5 Z (C ( Z te*.C d T/e $ort function now beco*e$ $i*.ler a$ $/own below. for HiZ0C i ^ N-1C iPPJ c *in Z *ini*u* Ha% i% N-1JC $wa.Ha\i]% a\*in]JC d

VU

It can be $een t/at it i$ now *uc/ ea$ier to un&er$tan& t/e co&e an& /ence i$ ea$ier to *aintain. 9t t/e $a*e ti*e we /a2e got two $e.arate reu$able function$ t/at can be u$e& el$ew/ere in t/e co&e. # %lig!tl2 'ore in,ol,ed e)a'*le 6It !a% 'o%tl2 been ada*ted fro' .owlerK% introduction to refactoring w!ic! i% freel2 a,ailable on t!e web7 Let u$ con$i&er a $i*.le .rogra* for a 2i&eo $tore. It /a$ t/ree cla$$e$6 #o2ie% ,ental% an& Cu$to*er. 3rogra* i$ tol& w/ic/ *o2ie$ a cu$to*er rente& an& for /ow long an& it t/en calculate$ t/e c/arge$ an& t/e =re'uent renter .oint$. Cu$to*er ob8ect can .rint a $tate*ent Hin 9SCIIJ. >ere i$ t/e co&e for t/e cla$$e$. 7o*ainAb8ect i$ a general cla$$ t/at &oe$ a few $tan&ar& t/ing$% $uc/ a$ /ol& a na*e. .ublic cla$$ 7o*ainAb8ect c .ublic 7o*ainAb8ect HString na*eJ c gna*e Z na*eC dC .ublic 7o*ainAb8ect HJ .ublic String na*e HJ return gna*eC dC cdC c

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

146

CS605 Software Engineering-II

VU

.ublic String toStringHJ c return gna*eC dC .rotecte& String gna*e Z Yno na*eYC d #o2ie re.re$ent$ t/e notion of a fil*. 9 2i&eo $tore *ig/t /a2e $e2eral ta.e$ in $toc4 of t/e $a*e *o2ie .ublic cla$$ #o2ie e5ten&$ 7o*ainAb8ect c .ublic $tatic final int C>IL7,ENS Z 2C .ublic $tatic final int ,EG1L9, Z 0C .ublic $tatic final int NE;g,ELE9SE Z 1C .ri2ate int g.riceCo&eC .ublic #o2ieHString na*e% int .riceCo&eJ c gna*e Z na*eC g.riceCo&e Z .riceCo&eC d .ublic int .riceCo&eHJ c return g.riceCo&eC d .ublic 2oi& .er$i$tHJ c ,egi$trar.a&& HY#o2ie$Y% t/i$JC d .ublic $tatic #o2ie getHString na*eJ c return H#o2ieJ ,egi$trar.get HY#o2ie$Y% na*eJC d d T/e *o2ie u$e$ a cla$$ calle& a regi$trar Hnot $/ownJ a$ a cla$$ to /ol& in$tance$ of *o2ie. I al$o &o t/i$ wit/ ot/er cla$$e$. I u$e t/e *e$$age .er$i$t to tell an ob8ect to $a2e it$elf to t/e regi$trar. I can t/en retrie2e t/e ob8ect% ba$e& on it$ na*e% wit/ a getHStringJ *et/o&. T/e ta.e cla$$ re.re$ent$ a ./($ical ta.e. cla$$ Ta.e e5ten&$ 7o*ainAb8ect c .ublic #o2ie *o2ieHJ c return g*o2ieC d .ublic Ta.eHString $erialNu*ber% #o2ie *o2ieJ c

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

147

CS605 Software Engineering-II g$erialNu*ber Z $erialNu*berC g*o2ie Z *o2ieC d .ri2ate String g$erialNu*berC .ri2ate #o2ie g*o2ieC d T/e rental cla$$ re.re$ent$ a cu$to*er renting a *o2ie. cla$$ ,ental e5ten&$ 7o*ainAb8ect c .ublic int &a($,ente&HJ c return g&a($,ente&C d .ublic Ta.e ta.eHJ c return gta.eC d .ri2ate Ta.e gta.eC .ublic ,entalHTa.e ta.e% int &a($,ente&J c gta.e Z ta.eC g&a($,ente& Z &a($,ente&C d .ri2ate int g&a($,ente&C d

VU

T/e cu$to*er cla$$ re.re$ent$ t/e cu$to*er. So far all t/e cla$$e$ /a2e been &u*b enca.$ulate& &ata. Cu$to*er /ol&$ all t/e be/a2ior for .ro&ucing a $tate*ent in it$ $tate*entHJ *et/o&. cla$$ Cu$to*er e5ten&$ 7o*ainAb8ect c .ublic Cu$to*erHString na*eJ c gna*e Z na*eC d .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c &ouble t/i$9*ount Z 0C ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line $witc/ Heac/.ta.eHJ.*o2ieHJ..riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 t/i$9*ount PZ 2C if Heac/.&a($,ente&HJ ` 2J t/i$9*ount PZ Heac/.&a($,ente&HJ - 2J T 1.5C brea4C

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

148

CS605 Software Engineering-II ca$e #o2ie.NE;g,ELE9SE6 t/i$9*ount PZ eac/.&a($,ente&HJ T 3C brea4C ca$e #o2ie.C>IL7,ENS6 t/i$9*ount PZ 1.5C if Heac/.&a($,ente&HJ ` 3J t/i$9*ount PZ Heac/.&a($,ente&HJ - 3J T 1.5C brea4C d total9*ount PZ t/i$9*ountC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PPC OO a&& bonu$ for a two &a( new relea$e rental if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J fre'uent,enter3oint$ PPC

VU

OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHt/i$9*ountJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d .ublic 2oi& a&&,entalH,ental argJ c grental$.a&&Ele*entHargJC d .ublic $tatic Cu$to*er getHString na*eJ c return HCu$to*erJ ,egi$trar.getHYCu$to*er$Y% na*eJC d .ublic 2oi& .er$i$tHJ c ,egi$trar.a&&HYCu$to*er$Y% t/i$JC d .ri2ate 0ector grental$ Z new 0ectorHJC d ;/at are (our i*.re$$ion$ about t/e &e$ign of t/i$ .rogra*L I woul& &e$cribe a$ not well &e$igne&% an& certainl( not ob8ect-oriente&. =or a $i*.le .rogra* i$ t/i$% t/at &oe$ not reall( *atter. T/ereh$ not/ing wrong wit/ a 'uic4 an& &irt( simple .rogra*. )ut if we i*agine t/i$ a$ a frag*ent of a *ore co*.le5 $($te*% t/en I /a2e $o*e real .roble*$ wit/ t/i$ .rogra*. T/at long $tate*ent routine in t/e Cu$to*er &oe$ far too *uc/. #an( of t/e t/ing$ t/at it &oe$ $/oul& reall( be &one b( t/e ot/er cla$$e$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

149

CS605 Software Engineering-II

VU

T/i$ i$ reall( broug/t out b( a new re'uire*ent% 8u$t in fro* t/e u$er$% t/e( want a $i*ilar $tate*ent in /t*l. 9$ (ou loo4 at t/e co&e (ou can $ee t/at it i$ i*.o$$ible to reu$e an( of t/e be/a2ior of t/e current $tate*entHJ *et/o& for an /t*lState*entHJ. <our onl( recour$e i$ to write a w/ole new *et/o& t/at &u.licate$ *uc/ of t/e be/a2ior of $tate*entHJ. Now of cour$e t/i$ i$ not too onerou$. <ou can 8u$t co.( t/e $tate*entHJ *et/o& an& *a4e w/ate2er c/ange$ (ou nee&. So t/e lac4 of &e$ign &oe$ not &o too *uc/ to /a*.er t/e writing of /t*lState*entHJ% Halt/oug/ it *ig/t be tric4( to figure out e5actl( w/ere to &o t/e c/ange$J. )ut w/at /a..en$ w/en t/e c/arging rule$ c/angeL <ou /a2e to fi5 bot/ $tate*entHJ an& /t*lState*entHJ% an& en$ure t/e fi5e$ are con$i$tent. T/e .roble* fro* cut an& .a$ting co&e co*e$ w/en (ou /a2e to c/ange it later. T/u$ if (ou are writing a .rogra* t/at (ou &onht e5.ect to c/ange% t/en cut an& .a$te i$ fine. If t/e .rogra* i$ long li2e& an& li4el( to c/ange% t/en cut an& .a$te i$ a *enace. )ut (ou $till /a2e to write t/e /t*lState*entHJ .rogra*. <ou *a( feel t/at (ou $/oul& not touc/ t/e e5i$ting $tate*entHJ *et/o&% after all it wor4$ fine. ,e*e*ber t/e ol& engineering a&age6 Yif it ainht bro4e% &onht fi5 itY. $tate*entHJ *a( not be bro4e% but it &oe$ /urt. It i$ *a4ing (our life *ore &ifficult to write t/e /t*lState*entHJ *et/o&. So t/i$ i$ w/ere refactoring co*e$ in. ;/en (ou fin& (ou /a2e to a&& a feature to a .rogra*% an& t/e .rogra*h$ co&e i$ not $tructure& in a con2enient wa( to a&& t/e featureC t/en fir$t refactor t/e .rogra* to *a4e it ea$( to a&& t/e feature% t/en a&& t/e feature. E)tracting t!e #'ount Calculation T/e ob2iou$ fir$t target of *( attention i$ t/e o2erl( long $tate*entHJ *et/o&. ;/en I loo4 at a long *et/o& li4e t/at% I a* loo4ing to ta4e a c/un4 of t/e co&e an extract a method fro* it. E5tracting a *et/o& i$ ta4ing t/e c/un4 of co&e an& *a4ing a *et/o& out of it. 9n ob2iou$ .iece /ere i$ t/e $witc/ $tate*ent Hw/ic/ IQ* /ig/lig/ting belowJ. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c &ouble t/i$9*ount Z 0C ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line $witc/ Heac/.ta.eHJ.*o2ieHJ..riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 t/i$9*ount PZ 2C if Heac/.&a($,ente&HJ ` 2J t/i$9*ount PZ Heac/.&a($,ente&HJ - 2J T 1.5C brea4C ca$e #o2ie.NE;g,ELE9SE6 t/i$9*ount PZ eac/.&a($,ente&HJ T 3C brea4C

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

150

CS605 Software Engineering-II ca$e #o2ie.C>IL7,ENS6 t/i$9*ount PZ 1.5C if Heac/.&a($,ente&HJ ` 3J t/i$9*ount PZ Heac/.&a($,ente&HJ - 3J T 1.5C brea4C d total9*ount PZ t/i$9*ountC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PPC OO a&& bonu$ for a two &a( new relea$e rental if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J fre'uent,enter3oint$ PPC

VU

OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHt/i$9*ountJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d T/i$ loo4$ li4e it woul& *a4e a goo& c/un4 to e5tract into it$ own *et/o&. ;/en we e5tract a *et/o&% we nee& to loo4 in t/e frag*ent for an( 2ariable$ t/at are local in $co.e to t/e *et/o& we are loo4ing at% t/at local 2ariable$ an& .ara*eter$. T/i$ $eg*ent of co&e u$e$ two6 eac/ an& t/i$9*ount. Af t/e$e eac/ i$ not *o&ifie& b( t/e co&e but t/i$9*ount i$ *o&ifie&. 9n( non-*o&ifie& 2ariable we can .a$$ in a$ a .ara*eter. #o&ifie& 2ariable$ nee& *ore care. If t/ere i$ onl( one we can return it. T/e te*. i$ initiali+e& to 0 eac/ ti*e roun& t/e loo.% an& not altere& until t/e $witc/ get$ it$ /an&$ on it. So we can 8u$t a$$ign t/e re$ult. T/e e5traction loo4$ li4e t/i$. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c &ouble t/i$9*ount Z 0C ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line t/i$9*ount Z a*ountAfHeac/JC total9*ount PZ t/i$9*ountC

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

151

CS605 Software Engineering-II OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PPC OO a&& bonu$ for a two &a( new relea$e rental if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J fre'uent,enter3oint$ PPC

VU

OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHt/i$9*ountJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d .ri2ate int a*ountAfH,ental eac/J c int t/i$9*ount Z 0C $witc/ Heac/.ta.eHJ.*o2ieHJ..riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 t/i$9*ount PZ 2C if Heac/.&a($,ente&HJ ` 2J t/i$9*ount PZ Heac/.&a($,ente&HJ - 2J T 1.5C brea4C ca$e #o2ie.NE;g,ELE9SE6 t/i$9*ount PZ eac/.&a($,ente&HJ T 3C brea4C ca$e #o2ie.C>IL7,ENS6 t/i$9*ount PZ 1.5C if Heac/.&a($,ente&HJ ` 3J t/i$9*ount PZ Heac/.&a($,ente&HJ - 3J T 1.5C brea4C d return t/i$9*ountC d ;/en I &i& t/i$ t/e te$t$ blew u.. 9 cou.le of t/e te$t figure$ ga2e *e t/e wrong an$wer. I wa$ .u++le& for a few $econ&$ t/en reali+e& w/at I /a& &one. =ooli$/l( I /a& *a&e t/e return t(.e of a*ountAfHJ int in$tea& of &ouble. .ri2ate &ouble a*ountAfH,ental eac/J c &ouble t/i$9*ount Z 0C $witc/ Heac/.ta.eHJ.*o2ieHJ..riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 t/i$9*ount PZ 2C if Heac/.&a($,ente&HJ ` 2J

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

152

CS605 Software Engineering-II t/i$9*ount PZ Heac/.&a($,ente&HJ - 2J T 1.5C brea4C ca$e #o2ie.NE;g,ELE9SE6 t/i$9*ount PZ eac/.&a($,ente&HJ T 3C brea4C ca$e #o2ie.C>IL7,ENS6 t/i$9*ount PZ 1.5C if Heac/.&a($,ente&HJ ` 3J t/i$9*ount PZ Heac/.&a($,ente&HJ - 3J T 1.5C brea4C d return t/i$9*ountC d

VU

Ith$ t/e 4in& of $ill( *i$ta4e t/at I often *a4e% an& it can be a .ain to trac4 &own a$ ?a2a con2ert$ int$ to &ouble$ wit/out co*.laining Hbut *erril( roun&ingJ. =ortunatel( it wa$ ea$( to fin& in t/i$ ca$e% becau$e t/e c/ange wa$ $o $*all. >ere i$ t/e e$$ence of t/e refactoring .roce$$ illu$trate& b( acci&ent. )ecau$e eac/ c/ange i$ $o $*all% an( error$ are 2er( ea$( to fin&. <ou &onQt $.en& long &ebugging% e2en if (ou are a$ carele$$ a$ I a*. T/i$ refactoring /a$ ta4en a large *et/o& an& bro4en it &own into two *uc/ *ore *anageable c/un4$. ;e can now con$i&er t/e c/un4$ a bit better. I &onQt li4e $o*e of t/e 2ariable$ na*e$ in a*ountAfHJ an& t/i$ i$ a goo& .lace to c/ange t/e*. .ri2ate &ouble a*ountAfH,ental a,entalJ c &ouble re$ult Z 0C $witc/ Ha,ental.ta.eHJ.*o2ieHJ..riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 re$ult PZ 2C if Ha,ental.&a($,ente&HJ ` 2J re$ult PZ Ha,ental.&a($,ente&HJ - 2J T 1.5C brea4C ca$e #o2ie.NE;g,ELE9SE6 re$ult PZ a,ental.&a($,ente&HJ T 3C brea4C ca$e #o2ie.C>IL7,ENS6 re$ult PZ 1.5C if Ha,ental.&a($,ente&HJ ` 3J re$ult PZ Ha,ental.&a($,ente&HJ - 3J T 1.5C brea4C d return re$ultC d I$ t/at rena*ing wort/ t/e effortL 9b$olutel(. Goo& co&e $/oul& co**unicate w/at it i$ &oing clearl(% an& 2ariable na*e$ are 4e( to clear co&e. Ne2er be afrai& to c/ange t/e na*e$ to t/ing$ to i*.ro2e clarit(. ;it/ goo& fin& an& re.lace tool$% it i$ u$uall( not &ifficult. Strong t(.ing an& te$ting will /ig/lig/t an(t/ing (ou *i$$. ,e*e*ber an( fool

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

153

CS605 Software Engineering-II

VU

can write co&e t/at a co*.uter can un&er$tan&% goo& .rogra**er$ write co&e t/at /u*an$ can un&er$tan&.

Lecture No. 53 -o,ing t!e a'ount calculation


9$ I loo4 at a*ountAf% I can $ee t/at it u$e$ infor*ation fro* t/e rental% but &oe$ not u$e infor*ation fro* t/e cu$to*er. T/i$ *et/o& i$ t/u$ on t/e wrong ob8ect% it $/oul& be *o2e& to t/e rental. To move a method (ou fir$t co.( t/e co&e o2er to rental% a&8u$t it to fit in it$ new /o*e an& co*.ile. Cla$$ ,ental &ouble c/argeHJ c &ouble re$ult Z 0C $witc/ Hta.eHJ.*o2ieHJ..riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 re$ult PZ 2C if H&a($,ente&HJ ` 2J re$ult PZ H&a($,ente&HJ - 2J T 1.5C brea4C ca$e #o2ie.NE;g,ELE9SE6 re$ult PZ &a($,ente&HJ T 3C brea4C ca$e #o2ie.C>IL7,ENS6 re$ult PZ 1.5C if H&a($,ente&HJ ` 3J re$ult PZ H&a($,ente&HJ - 3J T 1.5C brea4C d return re$ultC d In t/i$ ca$e fitting into it$ new /o*e *ean$ re*o2ing t/e .ara*eter. T/e ne5t $te. i$ to fin& e2er( reference to t/e ol& *et/o&% an& a&8u$ting t/e reference to u$e t/e new *et/o&. In t/i$ ca$e t/i$ $te. i$ ea$( a$ we 8u$t create& t/e *et/o& an& it i$ in onl( one .lace. In general% /owe2er% (ou nee& to &o a fin& acro$$ all t/e cla$$e$ t/at *ig/t be u$ing t/at *et/o&. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c &ouble t/i$9*ount Z 0C ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

154

CS605 Software Engineering-II

VU

OO&eter*ine a*ount$ for eac/ line t/i$9*ount Z eac/.c/argeHJC total9*ount PZ t/i$9*ountC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PPC OO a&& bonu$ for a two &a( new relea$e rental if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J fre'uent,enter3oint$ PPC OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHt/i$9*ountJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d ;/en IQ2e *a&e t/e c/ange t/e ne5t t/ing i$ to re*o2e t/e ol& *et/o&. T/e co*.iler $/oul& t/en tell *e if I *i$$e& an(t/ing. T/ere i$ certainl( $o*e *ore I woul& li4e to &o to ,ental.c/argeHJ but I will lea2e it for t/e *o*ent an& return to Cu$to*er.$tate*entHJ. T/e ne5t t/ing t/at $tri4e$ *e i$ t/at t/i$9*ountHJ i$ now .rett( re&un&ant. It i$ $et to t/e re$ult of eac/.c/argeHJ an& not c/ange& afterwar&$. T/u$ I can eli*inate t/i$9*ount b( replacing a temp with a query. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line total9*ount PZ eac/.c/argeHJC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PPC OO a&& bonu$ for a two &a( new relea$e rental if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J fre'uent,enter3oint$ PPC

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

155

CS605 Software Engineering-II

VU

OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHeac/.c/argeHJJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d I li4e to get ri& of te*.orar( 2ariable$ li4e t/u$ a$ *uc/ a$ .o$$ible. Te*.$ are often a .roble* in t/at t/e( cau$e a lot of .ara*eter$ to get .a$$e& aroun& w/en t/e( &onQt nee& to. <ou can ea$il( lo$e trac4 of w/at t/e( are t/ere for. T/e( are .articularl( in$i&iou$ in long *et/o&$. Af cour$e t/ere i$ a $*all .erfor*ance .rice to .a(% /ere t/e c/arge i$ now calculate& twice. )ut it i$ ea$( to o.ti*i+e t/at in t/e rental cla$$% an& (ou can o.ti*i+e *uc/ *ore effecti2el( w/en t/e co&e i$ .ro.erl( refactore&. E)tracting .re&uent 4enter 1oint% T/e ne5t $te. i$ to &o a $i*ilar t/ing for t/e fre'uent renter .oint$. 9gain t/e rule$ 2ar( wit/ t/e ta.e% alt/oug/ t/ere i$ le$$ 2ariation t/an wit/ t/e c/arging. )ut it $ee*$ rea$onable to .ut t/e re$.on$ibilit( on t/e rental. =ir$t we nee& to e5tract a *et/o& fro* t/e fre'uent renter .oint$ .art of t/e co&e H/ig/lig/te& belowJ. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line total9*ount PZ eac/.c/argeHJC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PPC OO a&& bonu$ for a two &a( new relea$e rental if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J fre'uent,enter3oint$ PPC OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHeac/.c/argeHJJ P YanYC d

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

156

CS605 Software Engineering-II

VU

OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d 9gain we loo4 at t/e u$e of locall( $co.e& 2ariable$. 9gain it u$e$ eac/% w/ic/ can be .a$$e& in a$ a .ara*eter. T/e ot/er te*. u$e& i$ fre'uent,enter3oint$. In t/i$ ca$e fre'uent,enter3oint$ &oe$ /a2e a 2alue before/an&. T/e bo&( of t/e e5tracte& *et/o& &oe$nQt rea& t/e 2alue% /owe2er% $o we &onQt nee& to .a$$ it in a$ a .ara*eter a$ long a$ we u$e an a..en&ing a$$ign*ent. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line total9*ount PZ eac/.c/argeHJC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PZ fre'uent,enter3ointAfHeac/JC OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHeac/.c/argeHJJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d int fre'uent,enter3ointAfH,ental eac/J c if HHeac/.ta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff eac/.&a($,ente&HJ ` 1J return 2C el$e return 1C d I &i& t/e e5traction% co*.ile& an& te$te&% an& t/en &i& a *o2e. ;it/ refactoring $*all $te.$ are t/e be$t% t/at wa( le$$ ten&$ to go wrong.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

157

CS605 Software Engineering-II .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO&eter*ine a*ount$ for eac/ line total9*ount PZ eac/.c/argeHJC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PZ eac/.fre'uent,enter3oint$HJC

VU

OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHeac/.c/argeHJJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHtotal9*ountJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d int fre'uent,enter3oint$HJ c if HHta.eHJ.*o2ieHJ..riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff &a($,ente&HJ ` 1J return 2C el$e return 1C d 4e'o,ing Te'*% 9$ I $ugge$te& before% te*.orar( 2ariable$ can be a .roble*. T/e( are onl( u$eful wit/in t/eir own routine% an& t/u$ t/e( encourage long co*.le5 routine$. In t/i$ ca$e we /a2e two te*.orar( 2ariable$% bot/ of w/ic/ are being u$e& to get a total fro* t/e rental$ attac/e& to t/e cu$to*er. )ot/ t/e a$cii an& /t*l 2er$ion$ will re'uire t/e$e total$. I li4e to replace temps with queries. @uerie$ are acce$$ible to an( *et/o& in t/e cla$$% an& t/u$ encourage a cleaner &e$ign wit/out long co*.le5 *et/o&$. I began b( re.lacing total9*ount wit/ a c/argeHJ *et/o& on cu$to*er. .ublic String $tate*entHJ c &ouble total9*ount Z 0C int fre'uent,enter3oint$ Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

158

CS605 Software Engineering-II ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO a&& fre'uent renter .oint$ fre'uent,enter3oint$ PZ eac/.fre'uent,enter3oint$HJC

VU

OO$/ow figure$ for t/i$ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHeac/.c/argeHJJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHc/argeHJJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$J P Y fre'uent renter .oint$YC return re$ultC d .ri2ate &ouble c/argeHJc &ouble re$ult Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC re$ult PZ eac/.c/argeHJC d return re$ultC d 9fter co*.iling an& te$ting t/at refactoring% I t/en &i& t/e $a*e for fre'uent,enter3oint$. .ublic String $tate*entHJ c Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y,ental ,ecor& for Y P na*eHJ P YanYC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO$/ow figure$ for eac/ rental re$ult PZ YatY P eac/.ta.eHJ.*o2ieHJ.na*eHJP YatY P String.2alueAfHeac/.c/argeHJJ P YanYC d OOa&& footer line$ re$ult PZ Y9*ount owe& i$ Y P String.2alueAfHc/argeHJJ P YanYC re$ult PZ Y<ou earne& Y P String.2alueAfHfre'uent,enter3oint$HJJ P Y fre'uent renter .oint$YC return re$ultC d .ri2ate int fre'uent,enter3oint$HJ c int re$ult Z 0C Enu*eration rental$ Z grental$.ele*ent$HJC w/ile Hrental$./a$#oreEle*ent$HJJ c

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

159

CS605 Software Engineering-II ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC re$ult PZ eac/.fre'uent,enter3oint$HJC d return re$ultC d

VU

It i$ wort/ $to..ing an& t/in4ing a bit about t/i$ refactoring. #o$t refactoring re&uce t/e a*ount of co&e% but t/i$ one increa$e$ it. T/atQ$ becau$e ?a2a re'uire$ a lot of $tate*ent$ to $et u. a $u**ing loo.. E2en a $i*.le $u**ing loo. wit/ one line of co&e .er ele*ent nee&$ $i5 line$ of $u..ort aroun& it. Ith$ an i&io* t/at i$ ob2iou$ to an( .rogra**er but it i$ noi$e t/at /i&e$ w/at t/e intent of t/e loo. i$. 9$ ?a2a &e2elo.$ an& buil&$ u. it$ abilit( to /an&le bloc4 clo$ure$ in t/e $t(le of S*alltal4% I e5.ect t/at o2er/ea& to &ecrea$e% .robabl( to t/e $ingle line t/at $uc/ an e5.re$$ion woul& ta4e in S*alltal4. T/e ot/er concern wit/ t/i$ refactoring lie$ in .erfor*ance. T/e ol& co&e e5ecute& t/e w/ile loo. once% t/e new co&e e5ecute$ it t/ree ti*e$. If t/e w/ile loo. ta4e$ ti*e% t/i$ *ig/t $ignificantl( i*.air .erfor*ance. #an( .rogra**er$ woul& not &o t/i$ refactoring $i*.l( for t/i$ rea$on. )ut note t/e wor&$ YifY an& Y*ig/tY. ;/ile $o*e loo.$ &o cau$e .erfor*ance i$$ue$% *o$t &o not. So w/ile refactoring &onht worr( about t/i$. ;/en (ou o.ti*i+e (ou will /a2e to worr( about it% but (ou will t/en be in a *uc/ better .o$ition to &o $o*et/ing about it% an& (ou will /a2e *ore o.tion$ to o.ti*i+e effecti2el(. H=or a goo& &i$cu$$ion on w/( it i$ better to write clearl( fir$t an& t/en o.ti*i+e% $ee \#cConnell% Co&e Co*.lete]. T/e$e 'uerie$ are now a2ailable to an( co&e written in t/e cu$to*er cla$$. In&ee& t/e( can ea$il( be a&&e& to t/e interface of t/e cla$$ $/oul& ot/er .art$ of t/e $($te* nee& t/i$ infor*ation. ;it/out 'uerie$ li4e t/e$e% ot/er *et/o&$ nee& to &eal wit/ 4nowing about t/e rental$ an& buil&ing t/e loo.$. In a co*.le5 $($te* t/at will lea& to *uc/ *ore co&e to write an& *aintain. <ou can $ee t/e &ifference i**e&iatel( wit/ t/e /t*lState*entHJ. I a* now at t/e .oint w/ere I ta4e off *( refactoring /at an& .ut on *( a&&ing function /at. I can write /t*lState*entHJli4e t/i$ Han& a&& an a..ro.riate te$tJ. .ublic String /t*lState*entHJ c Enu*eration rental$ Z grental$.ele*ent$HJC String re$ult Z Y^>1`,ental$ for ^E#`Y P na*eHJ P Y^OE#`^O>1`^3`anYC w/ile Hrental$./a$#oreEle*ent$HJJ c ,ental eac/ Z H,entalJ rental$.ne5tEle*entHJC OO$/ow figure$ for eac/ rental re$ult PZ eac/.ta.eHJ.*o2ieHJ.na*eHJP Y6 Y P String.2alueAfHeac/.c/argeHJJ P Y^),`anYC d OOa&& footer line$ re$ult PZ Y^3`<ou owe ^E#`Y P String.2alueAfHc/argeHJJ P Y^OE#`^3`anYC re$ult PZ YAn t/i$ rental (ou earne& ^E#`Y P String.2alueAfHfre'uent,enter3oint$HJJ P Y^OE#` fre'uent renter .oint$^3`YC return re$ultC d

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

160

CS605 Software Engineering-II

VU

T/ere i$ $till $o*e co&e co.ie& fro* t/e a$cii 2er$ion% but t/at i$ *ainl( &ue to $etting u. t/e loo.. =urt/er refactoring coul& clean t/at u. furt/er% e5tracting *et/o&$ for /ea&er% footer% an& &etail line are one route I coul& ta4e. )ut t/at i$nht w/ere I want to $.en& *( ti*e% I woul& li4e to *o2e onto t/e *et/o&$ Ih2e *o2e& onto rental. )ac4 on wit/ t/e refactoring /at. -o,ing t!e 4ental Calculation% to -o,ie <e$ ith$ t/at $witc/ $tate*ent t/at i$ bugging *e. It i$ a ba& i&ea to &o a $witc/ ba$e& on an attribute of anot/er ob8ect. If (ou *u$t u$e a $witc/ $tate*ent% it $/oul& be on (our own &ata% not on $o*eone el$eh$. T/i$ i*.lie$ t/at t/e c/arge $/oul& *o2e onto *o2ie Cla$$ *o2ie i &ouble c/argeHint &a($,ente&J c &ouble re$ult Z 0C $witc/ H.riceCo&eHJJ c ca$e ,EG1L9,6 re$ult PZ 2C if H&a($,ente& ` 2J re$ult PZ H&a($,ente& - 2J T 1.5C brea4C ca$e NE;g,ELE9SE6 re$ult PZ &a($,ente& T 3C brea4C ca$e C>IL7,ENS6 re$ult PZ 1.5C if H&a($,ente& ` 3J re$ult PZ H&a($,ente& - 3J T 1.5C brea4C d return re$ultC d =or t/i$ to wor4 I /a2e to .a$$ in t/e lengt/ of t/e rental% w/ic/ of cour$e i$ &ata &ue of t/e rental. T/e *et/o& effecti2el( u$e$ two .iece$ of &ata% t/e lengt/ of t/e rental an& t/e t(.e of t/e *o2ie. ;/( &o I .refer to .a$$ t/e lengt/ of rental rat/er t/an t/e *o2ieh$ t(.eL It$ becau$e t(.e infor*ation ten&$ to be *ore 2olatile. I can ea$il( i*agine new t(.e$ of 2i&eo$ a..earing. If I c/ange t/e *o2ieh$ t(.e I want t/e lea$t ri..le effect% $o I .refer to calculate t/e c/arge wit/in t/e *o2ie. I co*.ile& t/e *et/o& into *o2ie an& t/en a&8u$te& t/e c/arge *et/o& on rental to u$e t/e new *et/o&. Cla$$ rentali &ouble c/argeHJ c return gta.e.*o2ieHJ.c/argeHg&a($,ente&JC d

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

161

CS605 Software Engineering-II

VU

So*e .eo.le woul& .refer to re*o2e t/at c/ain of call$ b( /a2ing a c/argeHintJ *e$$age on ta.e. T/i$ woul& lea& to Cla$$ rental &ouble c/argeHJ c return gta.e.c/argeHg&a($,ente&JC d Cla$$ ta.e &ouble c/argeHJ c return g*o2ie.c/argeHg&a($,ente&JC d <ou can *a4e t/at c/ange if (ou li4e% I &onht ten& to worr( about *e$$age c/ain$ .ro2i&ing t/at t/e( all lie in t/e $a*e .ac4age. If t/e( cro$$ .ac4age boun&arie$% t/en Ih* not $o /a..(% an& woul& a&& an in$ulating *et/o&. >a2ing &one t/i$ wit/ c/arge a*ount$% Ih* incline& to &o t/e $a*e wit/ fre'uent renter .oint$. T/e nee& i$ le$$ .re$$ing% but I t/in4 it i$ *ore con$i$tent to &o t/e* bot/ t/e $a*e wa(. 9n& again if t/e *o2ie cla$$ification$ c/ange it *a4e$ it ea$ier to u.&ate t/e co&e. Cla$$ rentali int fre'uent,enter3oint$HJ c return gta.e.*o2ieHJ.fre'uent,enter3oint$Hg&a($,ente&JC d cla$$ *o2iei int fre'uent,enter3oint$Hint &a($,ente&Jc if HH.riceCo&eHJ ZZ NE;g,ELE9SEJ ff &a($,ente& ` 1J return 2C el$e return 1C d ;it/ t/e$e two c/ange$ I can /i&e t/o$e con$tant$% w/ic/ i$ generall( a Goo& T/ing. E2en con$tant &ata $/oul& be .ri2ate. .ri2ate $tatic final int C>IL7,ENS Z 2C .ri2ate $tatic final int ,EG1L9, Z 0C .ri2ate $tatic final int NE;g,ELE9SE Z 1C To reall( &o t/i$% /owe2er% I nee& to c/ange a cou.le of ot/er .art$ of t/e cla$$. I nee& to c/ange /ow we create a *o2ie. I u$e& to create a *o2ie wit/ a *e$$age li4e new #o2ie HY,anY% #o2ie.,EG1L9,JC an& t/e con$tructor cla$$ #o2iei .ri2ate #o2ieHString na*e% int .riceCo&eJ c gna*e Z na*eC - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

162

CS605 Software Engineering-II g.riceCo&e Z .riceCo&eC d To 4ee. t/i$ t(.e co&e /i&&en I nee& $o*e creation *et/o&$. .ublic $tatic #o2ie newNew,elea$eHString na*eJc return new #o2ie Hna*e% NE;g,ELE9SEJC d .ublic $tatic #o2ie new,egularHString na*eJc return new #o2ie Hna*e% ,EG1L9,JC d .ublic $tatic #o2ie newC/il&ren$HString na*eJ c return new #o2ie Hna*e% C>IL7,ENSJC d Now I create a new *o2ie wit/ #o2ie.new,egularHY#ont( 3(t/on an& t/e >ol( GrailYJC #o2ie$ can c/ange t/eir cla$$ification. I c/ange a *o2ieh$ cla$$ification wit/ a#o2ie.$et3riceCo&eH#o2ie.,EG1L9,JC I will nee& to a&& a bunc/ of *et/o&$ to /an&le t/e c/ange$ of cla$$ification. .ublic 2oi& be,egularHJ c g.riceCo&e Z ,EG1L9,C d .ublic 2oi& beNew,elea$eHJ c g.riceCo&e Z NE;g,ELE9SEC d .ublic 2oi& beC/il&ren$HJ c g.riceCo&e Z C>IL7,ENSC d

VU

Ith$ a bit of effort to $et u. t/e$e *et/o&$% but t/e( are a *uc/ *ore e5.licit interface t/en t/e t(.e co&e$. ?u$t loo4ing at t/e na*e of t/e *et/o& tell$ (ou w/at 4in& of *o2ie (ou are getting. T/i$ *a4e$ t/e co&e *ore un&er$tan&able. T/e tra&e off i$ t/at eac/ ti*e I a&& a .rice co&e I /a2e to a&& a creation an& u.&ate *et/o&. If I /a& lot$ of .rice co&e$ t/i$ woul& /urt H$o I woul&nht &o itJ. If I /a2e a few% /owe2er% t/en ith$ 'uite rea$onable. #t la%tL in!eritance So we /a2e $e2eral t(.e$ of *o2ie% w/ic/ /a2e &ifferent wa($ of an$wering t/e $a*e 'ue$tion. T/i$ $oun&$ li4e a 8ob for $ubcla$$e$. ;e coul& /a2e t/ree $ubcla$$e$ of *o2ie% eac/ of w/ic/ can /a2e it$ own 2er$ion of c/arge.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

163

CS605 Software Engineering-II

VU

T/i$ woul& allow *e to re.lace t/e $witc/ $tate*ent b( u$ing .ol(*or./i$*. Sa&l( it /a$ one $lig/t flaw6 it &oe$nht wor4. 9 *o2e can c/ange it$ cla$$ification &uring it$ lifeti*e. 9n ob8ect cannot c/ange it$ cla$$ &uring it$ lifeti*e. T/ere i$ a $olution /owe2er% t/e state pattern \Gang of =our]. ;it/ t/e $tate .attern t/e cla$$e$ loo4 li4e t/i$.

)( a&&ing t/e in&irection we can &o t/e $ubcla$$ing fro* t/e .rice co&e ob8ect% c/anging t/e .rice w/ene2er we nee& to. ;it/ a co*.le5 cla$$ (ou /a2e to *o2e &ata an& *et/o&$ aroun& in $*all .iece$ to a2oi& error$% it $ee*$ $low but it i$ t/e 'uic4e$t becau$e (ou a2oi& &ebugging. =or t/i$ ca$e I coul& .robabl( *o2e t/e &ata an& *et/o&$ in one go a$ t/e w/ole t/ing i$ not too co*.licate&. >owe2er Ihll &o it t/e bit b( bit wa(% $o (ou can $ee /ow it goe$. ?u$t re*e*ber to &o it one $*all bit at a ti*e if (ou &o t/i$ to a co*.licate& cla$$. T/e fir$t $te. i$ to create t/e new cla$$e$. T/en I nee& to $ort out /ow t/e( are *anage&. 9$ t/e &iagra* $/ow$ t/e( are all $ingleton$. It $ee*$ $en$ible to get /ol& of t/e* 2ia t/e $u.ercla$$ wit/ a *et/o& li4e 3rice.regularHJ. I can &o t/i$ b( getting t/e $u.ercla$$ to *anage t/e in$tance$ of t/e $ubcla$$e$. ab$tract cla$$ 3rice c $tatic 3rice regularHJ c return gregularC d $tatic 3rice c/il&ren$HJ c return gc/il&ren$C d $tatic 3rice new,elea$eHJ c return gnew,elea$eC d .ri2ate $tatic 3rice gc/il&ren$ Z new C/il&ren$3riceHJC .ri2ate $tatic 3rice gnew,elea$e Z new New,elea$e3riceHJC .ri2ate $tatic 3rice gregular Z new ,egular3riceHJC d Now I can begin to *o2e t/e &ata o2er. T/e fir$t .iece of &ata to *o2e o2er i$ t/e .rice co&e. Af cour$e Ih* not actuall( going to u$e t/e .rice co&e wit/in t/e 3rice ob8ect% but I will gi2e it t/e illu$ion of &oing $o. T/at wa( t/e ol& *et/o&$ will $till wor4. T/e( 4e( i$ to *o&if( t/o$e *et/o&$ t/at acce$$ an& u.&ate t/e .rice co&e 2alue wit/in #o2ie. #( fir$t $te. i$ to self#encapsulate the type code% en$uring t/at all u$e$ of t/e t(.e co&e go t/oug/ getting an& $etting *et/o&$. Since *o$t of t/e co&e ca*e fro* ot/er cla$$e$% *o$t *et/o&$ alrea&( u$e t/e getting *et/o&. >owe2er t/e con$tructor$ &o acce$$ t/e .rice co&e% I can u$e t/e $etting *et/o&$ in$tea&. .ublic $tatic #o2ie newNew,elea$eHString na*eJc - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
164

CS605 Software Engineering-II #o2ie re$ult Z new #o2ie Hna*eJC re$ult.beNew,elea$eHJC return re$ultC d .ublic $tatic #o2ie new,egularHString na*eJc #o2ie re$ult Z new #o2ie Hna*eJC re$ult.be,egularHJC return re$ultC d .ublic $tatic #o2ie newC/il&ren$HString na*eJ c #o2ie re$ult Z new #o2ie Hna*eJC re$ult.beC/il&ren$HJC return re$ultC d .ri2ate #o2ieHString na*eJ c gna*e Z na*eC d

VU

9fter co*.iling an& te$ting I now c/ange getting an& $etting *et/o&$ to u$e t/e new cla$$. .ublic 2oi& be,egularHJ c g.rice Z 3rice.regularHJC d .ublic 2oi& beNew,elea$eHJ c g.rice Z 3rice.new,elea$eHJC d .ublic 2oi& beC/il&ren$HJ c g.rice Z 3rice.c/il&ren$HJC d .ublic int .riceCo&eHJ c return g.rice..riceCo&eHJC d 9n& .ro2i&e t/e .riceCo&e *et/o&$ on 3rice an& it$ $ubcla$$e$. Cla$$ 3ricei ab$tract int .riceCo&eHJC Cla$$ ,egular3ricei int .riceCo&eHJc return #o2ie.,EG1L9,C d To &o t/i$ I nee& to *a4e t/e con$tant$ non-.ri2ate again. T/i$ i$ fine% I &onht *in& t/e* /a2ing a little fa*e before t/e( bite t/e &u$t.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

165

CS605 Software Engineering-II

VU

I can now co*.ile an& te$t an& t/e *ore co*.le5 *et/o&$ &onht reali+e t/e worl& /a$ c/ange&. 9fter *o2ing t/e &ata I can now $tart *o2ing *et/o&$. #( .ri*e target i$ t/e c/argeHJ *et/o&. It i$ $i*.le to *o2e. Cla$$ #o2iei &ouble c/argeHint &a($,ente&J c return g.rice.c/argeH&a($,ente&JC d Cla$$ 3ricei &ouble c/argeHint &a($,ente&J c &ouble re$ult Z 0C $witc/ H.riceCo&eHJJ c ca$e #o2ie.,EG1L9,6 re$ult PZ 2C if H&a($,ente& ` 2J re$ult PZ H&a($,ente& - 2J T 1.5C brea4C ca$e #o2ie.NE;g,ELE9SE6 re$ult PZ &a($,ente& T 3C brea4C ca$e #o2ie.C>IL7,ENS6 re$ult PZ 1.5C if H&a($,ente& ` 3J re$ult PZ H&a($,ente& - 3J T 1.5C brea4C d return re$ultC d Ance it i$ *o2e& I can $tart replacing the case statement with inheritance. I &o t/i$ b( ta4ing one leg of t/e ca$e $tate*ent at a ti*e% an& creating an o2erri&ing *et/o&. I $tart wit/ ,egular3rice. Cla$$ ,egular3ricei &ouble c/argeHint &a($,ente&Jc &ouble re$ult Z 2C if H&a($,ente& ` 2J re$ult PZ H&a($,ente& - 2J T 1.5C return re$ultC d T/i$ will o2erri&e t/e .arent ca$e $tate*ent% w/ic/ I 8u$t lea2e a$ it i$. I co*.ile an& te$t for t/i$ ca$e% t/en ta4e t/e ne5t leg% co*.ile an& te$ti. HTo *a4e $ure Ih* e5ecuting t/e $ubcla$$ co&e% I li4e to t/row in a &eliberate bug an& run it to en$ure t/e te$t$ blow u.. Not t/at Ih* .aranoi& or an(t/ing.J

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

166

CS605 Software Engineering-II Cla$$ C/il&ren$3rice &ouble c/argeHint &a($,ente&Jc &ouble re$ult Z 1.5C if H&a($,ente& ` 3J re$ult PZ H&a($,ente& - 3J T 1.5C return re$ultC d Cla$$ New,elea$e3ricei &ouble c/argeHint &a($,ente&Jc return &a($,ente& T 3C d

VU

;/en Ih2e &one t/at wit/ all t/e leg$% I &eclare t/e 3rice.c/argeHJ *et/o& ab$tract. Cla$$ 3ricei ab$tract &ouble c/argeHint &a($,ente&JC I can now &o t/e $a*e .roce&ure wit/ fre'uent,enter3oint$HJ. =ir$t I *o2e t/e *et/o& o2er to 3rice. Cla$$ #o2iei int fre'uent,enter3oint$Hint &a($,ente&Jc return g.rice.fre'uent,enter3oint$H&a($,ente&JC d Cla$$ 3ricei int fre'uent,enter3oint$Hint &a($,ente&Jc if HH.riceCo&eHJ ZZ #o2ie.NE;g,ELE9SEJ ff &a($,ente& ` 1J return 2C el$e return 1C d In t/i$ ca$e% /owe2er I wonht *a4e t/e $u.ercla$$ *et/o& ab$tract. In$tea& I will create an o2erri&ing *et/o& for new relea$e$% an& lea2e a &efine& *et/o& Ha$ t/e &efaultJ on t/e $u.ercla$$. Cla$$ New,elea$e3rice int fre'uent,enter3oint$Hint &a($,ente&Jc return H&a($,ente& ` 1J L 26 1C d Cla$$ 3ricei int fre'uent,enter3oint$Hint &a($,ente&Jc return 1C d Now I /a2e re*o2e& all t/e *et/o&$ t/at nee&e& a .rice co&e. So I can get ri& of t/e .rice co&e *et/o&$ an& &ata on bot/ #o2ie an& 3rice.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

167

CS605 Software Engineering-II

VU

3utting in t/e $tate .attern wa$ 'uite an effort% wa$ it wort/ itL T/e gain i$ now t/at $/oul& I c/ange an( of .riceh$ be/a2ior% a&& new .rice$% or a&& e5tra .rice &e.en&ent be/a2iorC it will be *uc/ ea$ier to c/ange. T/e re$t of t/e a..lication &oe$ not 4now about t/e u$e of t/e $tate .attern. =or t/e tin( a*ount of be/a2ior I currentl( /a2e it i$ not a big &eal. )ut in a *ore co*.le5 $($te* wit/ a &o+en or $o .rice &e.en&ent *et/o&$ t/i$ woul& *a4e a big &ifference. 9ll t/e$e c/ange$ were $*all $te.$% it $ee*$ $low to write it li4e t/i$% but not once &i& I /a2e to o.en t/e &ebugger. So t/e .roce$$ actuall( flowe& 'uite 'uic4l(.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

168

CS605 Software Engineering-II

VU

Lecture No. 55 Ca*abilit2 -aturit2 -odel Integration 6C--I7


(apability )aturity )odel or C## i$ a reference *o&el of *ature .ractice$ in a $.ecifie& &i$ci.line% u$e& to a$$e$$ a grou.:$ ca.abilit( to .erfor* t/at &i$ci.line. In fact t/ere are a nu*ber of C##$. T/e( &iffer b( &i$ci.line H$oftware% $($te*$% ac'ui$ition% etc.J% $tructure H$tage& 2er$u$ continuou$J% /ow *aturit( i$ &efine& H.roce$$ i*.ro2e*ent .at/J% an& /ow ca.abilit( i$ &efine& Hin$titutionali+ationJ. >ence DCa.abilit( #aturit( #o&el8E an& C##8 are u$e& b( t/e Software Engineering In$titute HSEIJ to &enote a .articular cla$$ of *aturit( *o&el$. Software C##% t/e one we $aw earlier on% i$ one of t/e *an( C## *o&el$. Na'e Software C## S($te* Engineering C## Software 9c'ui$ition C## S($te* Securit( Engineering C## =99-iC## I37-C## 3eo.le C## S3ICE #o&el Structure $tage& continuou$ $tage& continuou$ +o'ain $oftware &e2elo.*ent $($te* engineering $oftware ac'ui$ition $ecurit( engineering $oftware engineering% $($te*$ engineering% an& continuou$ ac'ui$ition /(bri& integrate& .ro&uct &e2elo.*ent $tage& wor4force continuou$ $oftware &e2elo.*ent

Since t/e$e *o&el$ /a2e &ifferent $tructure an& a..lication &o*ain$% an organi+ation coul& .otentiall( u$e *an( of t/e$e *o&el$ for t/eir &ifferent acti2itie$% at ti*e$ it coul& beco*e .roble*atic for t/e*. C##I Integrate$ $($te*$ an& $oftware &i$ci.line$ into $ingle .roce$$ i*.ro2e*ent fra*ewor4 an& .ro2i&e$ a fra*ewor4 for intro&ucing new &i$ci.line$ a$ nee&$ ari$e. It can now be a..lie& to 8u$t t/e $oftware engineering .ro8ect$ in an organi+ation or for t/e entire $.ectru* of acti2itie$ outline& abo2e. C--I 4e*re%entation% 9 re.re$entation allow$ an organi+ation to .ur$ue &ifferent i*.ro2e*ent ob8ecti2e$. T/ere are two t(.e$ of re.re$entation$ in t/e C##I *o&el$6 $tage& an& continuou$. T/e organi+ation an& .re$entation of t/e &ata are &ifferent in eac/ re.re$entation. >owe2er% t/e content i$ t/e $a*e. Staged 4e*re%entation Stage& re.re$entation i$ cla$$ical re.re$entation we /a2e alrea&( $een .re2iou$l(. It6 3ro2i&e$ a .ro2en $e'uence of i*.ro2e*ent$% eac/ $er2ing a$ a foun&ation for t/e ne5t. 3er*it$ co*.ari$on$ acro$$ an& a*ong organi+ation$ b( t/e u$e of *aturit( le2el$. - Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan
169

CS605 Software Engineering-II

VU

3ro2i&e$ an ea$( *igration fro* t/e S;-C## to C##I. 3ro2i&e$ a $ingle rating t/at $u**ari+e$ a..rai$al re$ult$ an& allow$ co*.ari$on$ a*ong organi+ation$ T/i$ re.re$entation in&icate$ *aturit( of an organi+ation:$ $tan&ar& .roce$$ -- to an$wer% D;/at i$ a goo& or&er for a..roac/ing i*.ro2e*ent acro$$ t/e organi+ationLE <ou *a( recall t/at a *aturit( le2el i$ a well-&efine& e2olutionar( .lateau of .roce$$ i*.ro2e*ent. T/ere are fi2e *aturit( le2el$ an& eac/ le2el i$ a la(er in t/e foun&ation for continuou$ .roce$$ i*.ro2e*ent u$ing a .ro2en $e'uence of i*.ro2e*ent$% beginning wit/ ba$ic *anage*ent .ractice$ an& .rogre$$ing t/roug/ a .re&efine& an& .ro2en .at/ of $ucce$$i2e le2el$. Eac/ *aturit( le2el .ro2i&e$ a nece$$ar( foun&ation for effecti2e i*.le*entation of .roce$$e$ at t/e ne5t le2el. >ig/er le2el .roce$$e$ /a2e le$$ c/ance of $ucce$$ wit/out t/e &i$ci.line .ro2i&e& b( lower le2el$. T/e effect of inno2ation can be ob$cure& in a noi$( .roce$$. >ig/er *aturit( le2el .roce$$e$ *a( be .erfor*e& b( organi+ation$ at lower *aturit( le2el$% wit/ t/e ri$4 of not being con$i$tentl( a..lie& in a cri$i$. Continuou% 4e*re%entation Continuou$ re.re$entation allow$ (ou to $elect t/e or&er of i*.ro2e*ent t/at be$t *eet$ (our organi+ation:$ bu$ine$$ ob8ecti2e$ an& *itigate$ (our organi+ation:$ area$ of ri$4. It enable$ co*.ari$on$ acro$$ an& a*ong organi+ation$ on a .roce$$-area-b(-.roce$$-area ba$i$ an& .ro2i&e$ an ea$( *igration fro* EI9 !31 Han& ot/er *o&el$ wit/ a continuou$ re.re$entationJ to C##I. 9$ o..o$e& to t/e $tage& re.re$entation% it in&icate$ i*.ro2e*ent wit/in a $ingle .roce$$ area -- to an$wer% D;/at i$ a goo& or&er for a..roac/ing i*.ro2e*ent of t/i$ .roce$$ areaLE Ca*abilit2 Le,el% 9 ca.abilit( le2el i$ a well-&efine& e2olutionar( .lateau &e$cribing t/e organi+ation:$ ca.abilit( relati2e to a .roce$$ area. T/ere are $i5 ca.abilit( le2el$. =or ca.abilit( le2el$ 1-5% t/ere i$ an a$$ociate& generic goal. Eac/ le2el i$ a la(er in t/e foun&ation for continuou$ .roce$$ i*.ro2e*ent. T/u$% ca.abilit( le2el$ are cu*ulati2e% i.e.% a /ig/er ca.abilit( le2el inclu&e$ t/e attribute$ of t/e lower le2el$. T/e fi2e Hactuall( $i5J ca.abilit( le2el$ H$tarting fro* 0J are enu*erate& below in t/e re2er$e or&er% 5 being t/e /ig/e$t an& 0 being t/e lowe$t. 5 4 3 2 1 0 A.ti*i+ing @uantitati2el( #anage& 7efine& #anage& 3erfor*e& Inco*.lete
170

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

CS605 Software Engineering-II

VU

T/e .roce$$ area ca.abilit( of an i*.le*ente& .roce$$ can be re.re$ente& b( a bar a$ $/own below.

Capabilit! Level

3 2 1 $

T2is point represents a 2ig2er level of 8maturit!9 t2an t2is point in a specific process area
7rocess "rea n

7rocess
4elating 1roce%% #rea Ca*abilit2 and /rgani8ational -aturit2 Argani+ational *aturit( i$ t/e focu$ of t/e $tage& re.re$entation% w/erea$ .roce$$ area ca.abilit( i$ t/e focu$ of t/e continuou$ re.re$entation. Argani+ational *aturit( an& .roce$$ area ca.abilit( are $i*ilar conce.t$. T/e &ifference between t/e* i$ t/at organi+ational *aturit( .ertain$ to a $et of .roce$$ area$ acro$$ an organi+ation% w/ile .roce$$ area ca.abilit( &eal$ wit/ a $et of .roce$$e$ relating to a $ingle .roce$$ area or $.ecific .ractice. Co'*ari%on of 4e*re%entation% Stage& 3roce$$ i*.ro2e*ent i$ *ea$ure& u$ing *aturit( le2el$. #aturit( le2el i$ t/e &egree of .roce$$ i*.ro2e*ent acro$$ a .re&efine& $et of .roce$$ area$. Argani+ational *aturit( .ertain$ to t/e D*aturit(E of a $et of .roce$$e$ acro$$ an organi+ation

Continuou$ 3roce$$ i*.ro2e*ent i$ *ea$ure& u$ing ca.abilit( le2el$. Ca.abilit( le2el i$ t/e ac/ie2e*ent of .roce$$ i*.ro2e*ent wit/in an in&i2i&ual .roce$$ area. 3roce$$ area ca.abilit( .ertain$ to t/e D*aturit(E of a .articular .roce$$ acro$$ an organi+ation.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

171

CS605 Software Engineering-II #d,antage% of Eac! 4e*re%entation

VU

Stage& .ro2i&e$ a roa&*a. for i*.le*enting grou.$ of .roce$$ area$ an& $e'uencing of i*.le*entation. It /a$ a fa*iliar $tructure for t/o$e tran$itioning fro* t/e Software C##. Continuou$ .ro2i&e$ *a5i*u* fle5ibilit( for focu$ing on $.ecific .roce$$ area$ accor&ing to bu$ine$$ goal$ an& ob8ecti2e$ an& /a$ a fa*iliar $tructure for t/o$e tran$itioning fro* EI9 !31. 9$ t/e $tage& re.re$entation re'uire$ all I39$ to be a&&re$$e& at a .articular le2el before a co*.an( can *o2e to t/e ne5t *aturit( le2el% it *a( not be ea$( for $*all co*.anie$ to i*.le*ent t/i$ *o&el. T/ere *a( be a nu*ber of acti2itie$ t/at *a( not be rele2ant to t/eir t(.e of wor4 but t/e( woul& $till /a2e to &o t/e* in or&er to be at a certain le2el. An t/e ot/er /an&% organi+ation can focu$ on t/eir own area$ of e5.erti$e an& *a( be able to ac/ie2e /ig/ ca.abilit( le2el$ in $o*e area$ wit/out bot/ering about t/e re$t. T/i$ i$ a great a&2antage for $*all organi+ation an& /ence t/i$ *o&el i$ belie2e& to be *ore $uitable for $*all 3a4i$tani organi+ation$ t/an t/e $tage& one.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

172

CS605 Software Engineering-II

VU

Lecture No. 55 C-- /,er,iew


C-- -aturit2 Le,el% T/ere are fi2e le2el$ &efine& along t/e continuu* of t/e C## an&% accor&ing to t/e SEI6 Y3re&ictabilit(% effecti2ene$$% an& control of an organi+ationQ$ $oftware .roce$$e$ are belie2e& to i*.ro2e a$ t/e organi+ation *o2e$ u. t/e$e fi2e le2el$. ;/ile not rigorou$% t/e e*.irical e2i&ence to &ate $u..ort$ t/i$ belief.Y Le,el 1 - #d !oc 6C!aotic7 It i$ c/aracteri$tic of .roce$$e$ at t/i$ le2el t/at t/e( are Ht(.icall(J un&ocu*ente& an& in a $tate of &(na*ic c/ange% ten&ing to be &ri2en in an ad hoc% uncontrolle& an& reacti2e *anner b( u$er$ or e2ent$. T/i$ .ro2i&e$ a c/aotic or un$table en2iron*ent for t/e .roce$$e$. /rgani8ational i'*lication% HaJ In$titutional 4nowle&ge ten&$ to be $cattere& Ht/ere being li*ite& $tructure& a..roac/ to 4nowle&ge *anage*entJ in $uc/ en2iron*ent$% not all of t/e $ta4e/ol&er$ or .artici.ant$ in t/e .roce$$e$ *a( 4now or un&er$tan& all of t/e co*.onent$ t/at *a4e u. t/e .roce$$e$. 9$ a re$ult% .roce$$ .erfor*ance in $uc/ organi+ation$ i$ li4el( to be 2ariable Hincon$i$tentJ an& &e.en& /ea2il( on t/e in$titutional 4nowle&ge% or t/e co*.etence% or t/e /eroic effort$ of relati2el( few .eo.le or $*all grou.$. HbJ 7e$.ite t/e c/ao$% $uc/ organi+ation$ *anage to .ro&uce .ro&uct$ an& $er2ice$. >owe2er% in &oing $o% t/ere i$ $ignificant ri$4 t/at t/e( will ten& to e5cee& an( e$ti*ate& bu&get$ or $c/e&ule$ for t/eir .ro8ect$ - it being &ifficult to e$ti*ate w/at a .roce$$ will &o w/en (ou &o not full( un&er$tan& t/e .roce$$ Hw/at it i$ t/at (ou &oJ in t/e fir$t .lace an& cannot t/erefore control it or *anage it effecti2el(. HcJ 7ue to t/e lac4 of $tructure an& for*alit(% organi+ation$ at t/i$ le2el *a( o2erco**it% or aban&on .roce$$e$ &uring a cri$i$% an& it i$ unli4el( t/at t/e( will be able to re.eat .a$t $ucce$$e$. T/ere ten&$ to be li*ite& .lanning% li*ite& e5ecuti2e co**it*ent or bu(-in to .ro8ect$% an& li*ite& acce.tance of .roce$$e$. Le,el 0 - 4e*eatable It i$ c/aracteri$tic of .roce$$e$ at t/i$ le2el t/at $o*e .roce$$e$ are re.eatable% .o$$ibl( wit/ con$i$tent re$ult$. 3roce$$ &i$ci.line i$ unli4el( to be rigorou$% but w/ere it e5i$t$ it *a( /el. to en$ure t/at e5i$ting .roce$$e$ are *aintaine& &uring ti*e$ of $tre$$. /rgani8ational i'*lication%

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

173

CS605 Software Engineering-II

VU

iJ 3roce$$e$ an& t/eir out.ut$ coul& be 2i$ible to *anage*ent at &efine& .oint$% but re$ult$ *a( not alwa($ be con$i$tent. =or e5a*.le% for .ro8ectO.rogra* *anage*ent .roce$$e$% e2en t/oug/ H$a(J $o*e ba$ic .roce$$e$ are e$tabli$/e& to trac4 co$t% $c/e&ule% an& functionalit(% an& if a &egree of .roce$$ &i$ci.line i$ in .lace to re.eat earlier $ucce$$e$ on .ro8ect$ wit/ $i*ilar a..lication$ an& $co.e% t/ere coul& $till be a $ignificant ri$4 of e5cee&ing co$t an& ti*e e$ti*ate$. Le,el 3 - +efined It i$ c/aracteri$tic of .roce$$e$ at t/i$ le2el t/at t/ere are $et$ of &efine& an& &ocu*ente& $tan&ar& .roce$$e$ e$tabli$/e& an& $ub8ect to $o*e &egree of i*.ro2e*ent o2er ti*e. T/e$e $tan&ar& .roce$$e$ are in .lace Hi.e.% t/e( are t/e 9S-IS .roce$$e$J an& u$e& to e$tabli$/ con$i$tenc( of .roce$$ .erfor*ance acro$$ t/e organi+ation. /rgani8ational i'*lication% HaJ 3roce$$ *anage*ent $tart$ to occur u$ing &efine& &ocu*ente& .roce$$e$% wit/ *an&ator( .roce$$ ob8ecti2e$% an& en$ure$ t/at t/e$e ob8ecti2e$ are a..ro.riatel( a&&re$$e&. Le,el 5 - -anaged It i$ c/aracteri$tic of .roce$$e$ at t/i$ le2el t/at% u$ing .roce$$ *etric$% *anage*ent can effecti2el( control t/e 9S-IS .roce$$ He.g.% for $oftware &e2elo.*ent J. In .articular% *anage*ent can i&entif( wa($ to a&8u$t an& a&a.t t/e .roce$$ to .articular .ro8ect$ wit/out *ea$urable lo$$e$ of 'ualit( or &e2iation$ fro* $.ecification$. 3roce$$ Ca.abilit( i$ e$tabli$/e& fro* t/i$ le2el. /rgani8ational i'*lication% aJ @uantitati2e 'ualit( goal$ ten& to be $et for .roce$$ out.ut - e.g.% $oftware or $oftware *aintenance. bJ 1$ing 'uantitati2eO$tati$tical tec/ni'ue$% .roce$$ .erfor*ance i$ *ea$ure& an& *onitore& an& generall( .re&ictable an& controllable al$o. Le,el 5 - /*ti'i8ing It i$ a c/aracteri$tic of .roce$$e$ at t/i$ le2el t/at t/e focu$ i$ on continuall( i*.ro2ing .roce$$ .erfor*ance t/roug/ bot/ incre*ental an& inno2ati2e tec/nological c/ange$Oi*.ro2e*ent$. /rgani8ational i'*lication% HaJ @uantitati2e .roce$$-i*.ro2e*ent ob8ecti2e$ for t/e organi+ation are e$tabli$/e&% continuall( re2i$e& to reflect c/anging bu$ine$$ ob8ecti2e$% an& u$e& a$ criteria in *anaging .roce$$ i*.ro2e*ent. T/u$% .roce$$ i*.ro2e*ent$ to a&&re$$ co**on cau$e$ of .roce$$ 2ariation an& *ea$urabl( i*.ro2e t/e organi+ation:$ .roce$$e$ are i&entifie&% e2aluate&% an& &e.lo(e&.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

174

CS605 Software Engineering-II

VU

HbJ T/e effect$ of &e.lo(e& .roce$$ i*.ro2e*ent$ are *ea$ure& an& e2aluate& again$t t/e 'uantitati2e .roce$$-i*.ro2e*ent ob8ecti2e$. HcJ )ot/ t/e &efine& .roce$$e$ an& t/e organi+ation:$ $et of $tan&ar& .roce$$e$ are target$ for *ea$urable i*.ro2e*ent acti2itie$. H&J 9 critical &i$tinction between *aturit( le2el 4 an& *aturit( le2el 5 i$ t/e t(.e of .roce$$ 2ariation a&&re$$e&. 9t *aturit( le2el 4% .roce$$e$ are concerne& wit/ a&&re$$ing $tati$tical special causes of .roce$$ 2ariation an& .ro2i&ing $tati$tical .re&ictabilit( of t/e re$ult$% an& t/oug/ .roce$$e$ *a( .ro&uce .re&ictable re$ult$% t/e re$ult$ *a( be in$ufficient to ac/ie2e t/e e$tabli$/e& ob8ecti2e$. 9t *aturit( le2el 5% .roce$$e$ are concerne& wit/ a&&re$$ing $tati$tical common causes of .roce$$ 2ariation an& c/anging t/e .roce$$ Hfor e5a*.le% $/ifting t/e *ean of t/e .roce$$ .erfor*anceJ to i*.ro2e .roce$$ .erfor*ance. T/i$ woul& be &one at t/e $a*e ti*e a$ *aintaining t/e li4eli/oo& of ac/ie2ing t/e e$tabli$/e& 'uantitati2e .roce$$-i*.ro2e*ent ob8ecti2e$. E)ten%ion% So*e 2er$ion$ of C##I fro* SEI in&icate a Yle2el 0Y% c/aracteri+e& a$ YInco*.leteY. So*e .un&it$ lea2e t/i$ le2el out a$ re&un&ant or uni*.ortant% but 3re$$*an an& ot/er$ *a4e note of it. Co'*ari%on of C--I 4e*re%entation% Staged Continuou% ;/at i$ a C##I *o&el re.re$entationL T/e an$wer re'uire$ an e5.lanation of t/e $tructure of C##I *o&el$. T/e ba$ic buil&ing bloc4$ in e2er( C##I *o&el are calle& Y.roce$$ area$.Y 9 .roce$$ area &oe$ not &e$cribe how an effecti2e .roce$$ i$ e5ecute& He.g.% entrance an& e5it criteria% role$ of .artici.ant$% re$ource$J. In$tea&% a .roce$$ area &e$cribe$ what t/o$e u$ing an effecti2e .roce$$ &o H.ractice$J an& why t/e( &o t/o$e t/ing$ Hgoal$J. Selecting a 4e*re%entation ;/en *a4ing t/e &eci$ion about w/ic/ arc/itectural re.re$entation to u$e for .roce$$ i*.ro2e*ent% co*.arati2e a&2antage$ of eac/ a..roac/ a$ re.re$ente& in t/e gi2en Table. Continuou% 4e*re%entation Staged 4e*re%entation

Grant$ e5.licit free&o* to $elect t/e or&er Enable$ organi+ation$ to /a2e a .re&efine& of i*.ro2e*ent t/at be$t *eet$ t/e an& .ro2en .at/. organi+ationQ$ bu$ine$$ ob8ecti2e$. )uil&$ on a relati2el( long /i$tor( of u$e. Enable$ increa$e& 2i$ibilit( into t/e ca.abilit( ac/ie2e& wit/in eac/ in&i2i&ual Ca$e $tu&ie$ an& &ata e5i$t t/at $/ow return .roce$$ area. on in2e$t*ent. Su..ort$ a focu$ on ri$4$ $.ecific to 3er*it$ co*.ari$on$ acro$$ an& a*ong

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

175

CS605 Software Engineering-II

VU

in&i2i&ual .roce$$ area$. 9ffor&$ a *ore &irect co*.ari$on of .roce$$ i*.ro2e*ent to ISA 15504 becau$e t/e organi+ation of .roce$$ area$ i$ &eri2e& fro* 15504.

organi+ation$. Intro&uce$ a $e'uence of i*.ro2e*ent$% beginning wit/ ba$ic *anage*ent .ractice$ an& .rogre$$ing t/roug/ $ucce$$i2e le2el$% eac/ $er2ing a$ a foun&ation for t/e ne5t.

9llow$ t/e generic .ractice$ fro* /ig/er Su**ari+e$ .roce$$-i*.ro2e*ent re$ult$ in ca.abilit( le2el$ to be *ore e2enl( an& a $i*.le for*Na $ingle *aturit(-le2el co*.letel( a..lie& to all of t/e .roce$$ nu*ber. area$.

1ro9ect -anage'ent Concern% 3ro8ect *anage*ent i$ t/e &i$ci.line of .lanning% organi+ing an& *anaging re$ource$ to bring about t/e $ucce$$ful co*.letion of $.ecific .ro8ect goal$ an& ob8ecti2e$. 9 .ro8ect i$ a finite en&ea2or H/a2ing $.ecific $tart an& co*.letion &ate$J un&erta4en to create a uni'ue .ro&uct or $er2ice w/ic/ bring$ about beneficial c/ange or a&&e& 2alue. T/i$ finite c/aracteri$tic of .ro8ect$ $tan&$ in $/ar. contra$t to .roce$$e$% or o.eration$% w/ic/ are .er*anent or $e*i-.er*anent functional wor4 to re.etiti2el( .ro&uce t/e $a*e .ro&uct or $er2ice. In .ractice% t/e *anage*ent of t/e$e two $($te*$ i$ often foun& to be 'uite &ifferent% an& a$ $uc/ re'uire$ t/e &e2elo.*ent of &i$tinct tec/nical $4ill$ an& t/e a&o.tion of $e.arate *anage*ent. T/ere are $e2eral a..roac/e$ t/at can be ta4en to *anaging .ro8ect acti2itie$ inclu&ing agile% interacti2e% incre*ental% an& ./a$e& a..roac/e$. ,egar&le$$ of t/e a..roac/ e*.lo(e&% careful con$i&eration nee&$ to be gi2en to clarif( $urroun&ing .ro8ect ob8ecti2e$% goal$% an& i*.ortantl(% t/e role$ an& re$.on$ibilitie$ of all .artici.ant$ an& $ta4e/ol&er$.

T!e traditional a**roac!


9 tra&itional ./a$e& a..roac/ i&entifie$ a $e'uence of $te.$ to be co*.lete&. In t/e Ytra&itional a..roac/Y% we can &i$tingui$/ 5 co*.onent$ of a .ro8ect H4 $tage$ .lu$ controlJ in t/e &e2elo.*ent of a .ro8ect6

T(.ical &e2elo.*ent ./a$e$ of a .ro8ect

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

176

CS605 Software Engineering-II


VU

3ro8ect initiation $tageC 3ro8ect .lanning or &e$ign $tageC 3ro8ect e5ecution or .ro&uction $tageC 3ro8ect *onitoring an& controlling $($te*$C 3ro8ect co*.letion $tage.

Not all t/e .ro8ect$ will 2i$it e2er( $tage a$ .ro8ect$ can be ter*inate& before t/e( reac/ co*.letion. So*e .ro8ect$ .robabl( &onQt /a2e t/e .lanning an&Oor t/e *onitoring. So*e .ro8ect$ will go t/roug/ $te.$ 2% 3 an& 4 *ulti.le ti*e$. #an( in&u$trie$ utili+e 2ariation$ on t/e$e $tage$. =or e5a*.le% in bric4$ an& *ortar arc/itectural &e$ign% .ro8ect$ t(.icall( .rogre$$ t/roug/ $tage$ li4e 3re-3lanning% Conce.tual 7e$ign% Sc/e*atic 7e$ign% 7e$ign 7e2elo.*ent% Con$truction 7rawing$ Hor Contract 7ocu*ent$J% an& Con$truction 9&*ini$tration. In $oftware &e2elo.*ent% t/i$ a..roac/ i$ often 4nown a$ Ywaterfall &e2elo.*entY% i.e.% one $erie$ of ta$4$ after anot/er in linear $e'uence. In $oftware &e2elo.*ent *an( organi+ation$ /a2e a&a.te& t/e ,ational 1nifie& 3roce$$ H,13J to fit t/i$ *et/o&olog(% alt/oug/ ,13 &oe$ not re'uire or e5.licitl( reco**en& t/i$ .ractice. ;aterfall &e2elo.*ent can wor4 for $*all tig/tl( &efine& .ro8ect$% but for larger .ro8ect$ of un&efine& or un4nowable $co.e% it i$ le$$ $uite&. T/e Cone of 1ncertaint( e5.lain$ $o*e of t/i$ a$ t/e .lanning *a&e on t/e initial ./a$e of t/e .ro8ect $uffer$ fro* a /ig/ &egree of uncertaint(. T/i$ beco*e$ $.eciall( true a$ $oftware &e2elo.*ent i$ often t/e reali+ation of a new or no2el .ro&uct% t/i$ *et/o& /a$ been wi&el( acce.te& a$ ineffecti2e for $oftware .ro8ect$ w/ere re'uire*ent$ are largel( un4nowable u. front an& $u$ce.tible to c/ange. ;/ile t/e na*e$ *a( &iffer fro* in&u$tr( to in&u$tr(% t/e actual $tage$ t(.icall( follow co**on $te.$ to .roble* $ol2ing N Y&efining t/e .roble*% weig/ing o.tion$% c/oo$ing a .at/% i*.le*entation an& e2aluation.Y Software ;ualit2 #%%urance Software 'ualit( a$$urance HS@9J con$i$t$ of a *ean$ of *onitoring t/e $oftware engineering .roce$$e$ an& *et/o&$ u$e& to en$ure 'ualit(. T/e *et/o&$ b( w/ic/ t/i$ i$ acco*.li$/e& are *an( an& 2arie&% an& *a( inclu&e en$uring confor*ance to one or *ore $tan&ar&$% $uc/ a$ ISA "000 or C##I. T/i$ &efinition e*./a$i+e$ u.on t/ree i*.ortant .oint$6 $ $ $ Software re'uire*ent$ are t/e foun&ation fro* w/ic/ 'ualit( i$ *ea$ure&. Lac4 of confor*ance i$ lac4 of 'ualit( S.ecifie& $tan&ar&$ &efine a $et of &e2elo.*ent criteria t/at gui&e t/e *anner in w/ic/ $oftware i$ engineere&. If t/e criteria are not followe&% lac4 of 'ualit( will al*o$t $urel( re$ult. 9 $et of i*.licit re'uire*ent$ often goe$ un*entione& Hea$e of u$e% goo& *aintainabilit( etc.J

9not/er 2er( i*.ortant 'ue$tion i$6 7o (ou nee& to worr( about it after t/e co&e /a$ been generate&L In fact% S@9 i$ an u*brella acti2it( t/at i$ a..lie& t/roug/out t/e $oftware .roce$$.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

177

CS605 Software Engineering-II ;ualit2 #%%urance

VU

Goal of 'ualit( a$$urance i$ to .ro2i&e t/e *anage*ent wit/ t/e nece$$ar( &ata to be infor*e& about .ro&uct 'ualit(. It con$i$t$ of au&iting an& re.orting function$ of *anage*ent. If &ata .ro2i&e& t/roug/ @9 i&entifie$ .roble*$% t/e *anage*ent &e.lo($ t/e nece$$ar( re$ource$ to fi5 it an& /ence ac/ie2e$ &e$ire& 'ualit( control. Co%t of &ualit2 9 2er( $ignificant 'ue$tion i$6 &oe$ 'ualit( a$$urance a&& an( 2alue. T/at i$% i$ wort/ $.en&ing a lot of *one( in 'ualit( a$$urance .ractice$L In or&er to un&er$tan& t/e i*.act of 'ualit( a$$urance .ractice$% we /a2e to un&er$tan& t/e co$t of 'ualit( Hor lac4 t/ereofJ in a $($te*. @ualit( /a$ a &irect an& in&irect co$t in t/e for* of co$t of .re2ention% a..rai$al% an& failure. If we tr( to .re2ent .roble*$% ob2iou$l( we will /a2e to incur co$t. T/i$ co$t inclu&e$6 $ @ualit( .lanning $ =or*al tec/nical re2iew$ $ Te$t e'ui.*ent $ Training ;e will &i$cu$$ t/e$e in *ore &etail in t/e later $ection$. T/e co$t of a..rai$al inclu&e$ acti2itie$ to gain in$ig/t into t/e .ro&uct con&ition. It in2ol2e$ in-.roce$$ an& inter-.roce$$ in$.ection an& te$ting. 9n& finall(% failure co$t. =ailure co$t /a$ two co*.onent$6 internal failure co$t an& e5ternal failure co$t. Internal failure co$t re'uire$ rewor4% re.air% an& failure *o&e anal($i$. An t/e ot/er /an&% e5ternal failure co$t in2ol2e$ co$t for co*.laint re$olution% .ro&uct return an& re.lace*ent% /el.-line $u..ort% warrant( wor4% an& law $uit$. S;# #cti,itie% T/ere are two &ifferent grou.$ in2ol2e& in S@9 relate& acti2itie$6 $ $ Software engineer$ w/o &o t/e tec/nical wor4 S@9 grou. w/o i$ re$.on$ible for @9 .lanning% o2er$ig/t% recor& 4ee.ing% anal($i$% an& re.orting Software engineer$ a&&re$$ 'ualit( b( a..l(ing $oli& tec/nical *et/o&$ an& *ea$ure$% con&ucting for*al an& tec/nical re2iew$% an& .erfor*ing well .lanne& $oftware te$ting. T/e S@9 grou. a$$i$t$ t/e $oftware tea* in ac/ie2ing a /ig/ 'ualit( .ro&uct. S;# Frou* #cti,itie% 9n S@9 .lan i$ &e2elo.e& for t/e .ro8ect &uring .ro8ect .lanning an& i$ re2iewe& b( all $ta4e /ol&er$. T/e .lan inclu&e$ t/e i&entification of6 $ $ $ $ $ E2aluation$ to be .erfor*e& 9u&it$ an& re2iewe& to be .erfor*e& Stan&ar&$ t/at are a..licable to t/e .ro8ect 3roce&ure$ for error re.orting an& trac4ing 7ocu*ent$ to be .ro&uce& b( t/e S@9 grou.

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

178

CS605 Software Engineering-II $ 9*ount of fee&bac4 .ro2i&e& to t/e $oftware .ro8ect tea*

VU

T/e grou. .artici.ate$ in t/e &e2elo.*ent of t/e .ro8ect:$ $oftware .roce$$ &e$cri.tion. T/e $oftware tea* $elect$ t/e .roce$$ an& S@9 grou. re2iew$ t/e .roce$$ &e$cri.tion for co*.liance wit/ t/e organi+ational .olicie$% internal $oftware $tan&ar&$% e5ternall( i*.o$e& $tan&ar&$% an& ot/er .art$ of t/e $oftware .ro8ect .lan. ;ualit2 Control T/e ne5t 'ue$tion t/at we nee& to a$4 i$% once we /a2e &efine& /ow to a$$e$$ 'ualit(% /ow are we going to *a4e $ure t/at our .roce$$e$ &eli2er t/e .ro&uct wit/ t/e &e$ire& 'ualit(. T/at i$% /ow are we going to control t/e 'ualit( of t/e .ro&uctL T/e ba$ic .rinci.le of 'ualit( control i$ to control t/e 2ariation a$ 2ariation control i$ t/e /eart of 'ualit( control. It inclu&e$ re$ource an& ti*e e$ti*ation% te$t co2erage% 2ariation in nu*ber of bug$% an& 2ariation in $u..ort. =ro* one .ro8ect to anot/er we want to *ini*i+e t/e .re&icte& re$ource$ nee&e& to co*.lete a .ro8ect an& calen&ar ti*e. T/i$ in2ol2e$ a $erie$ of in$.ection% re2iew$% an& te$t$ an& inclu&e$ fee&bac4 loo.. So 'ualit( control i$ a co*bination of *ea$ure*ent an& fee&bac4 an& co*bination of auto*ate& tool$ an& *anual interaction.

T!e End

- Co.( ,ig/t 0irtual 1ni2er$it( of 3a4i$tan

179