CS577B HOMEWORK ASSIGNMENT #1
Due February 18
Use COCOMO 2.0 as defined in the model definition manual in the course notes for the cost estimation problems. Unless stated otherwise, the problems can be done with USC COCOMO available in the CS577 class account, another COCOMO tool or by hand. Show all your work including model inputs and outputs.
1. Calculate the effort and schedule for the following software project and account for adapted code:
total size=175,000 lines of code, modified code=50,000 lines of code,
RELY=high, ACAP=low, all other cost drivers=nominal.
For the modified code, DM=30, CM=35, IM=40, AA=4, SU=20.
Answer
Cost drivers: RELY=high (EM=1.15); ACAP=low (EM=1.22); EAF = 1.15*1.22*1=1.4
For modified code: UNFM not mentioned - choose nominal (.4 in middle of
range); AAF = .4*30 + .3*35+ .3*40= 34.5;
AAM = (4 + 34.5(1+.02*20*.4)/100 = .44
Using eqn. 2 on p. 11, ESLOC = 125,000 (new) + 50,000*AAM (modified) =
125,000 + .44*50,000 = 147,010
Effort and schedule: assume all scale drivers = NOMINAL, so B exponent
= 1.16
E = 2.5*1471.16*1.4 = 1145 PM (eqn. 8 in model definition manual)
S = 3*1145 (.33+.2*(1.16-1.01) = 37.9 months (eqn. 11)
2. Assume the estimated effort of a new project is 30 person-months. The project manager is considering the purchase of an integrated development environment which would increase the TOOL rating from nominal to very high. What is the new estimated effort?
Answer
EM = 1.0 for TOOL at nominal, and .75 at very high
new effort = 30 * .75/1.0 = 22.5 person-months
3. The estimated schedule for a project is 4 years.
a) What will be the estimated increase in effort if the customer mandates a schedule of 3 years and 5 months?
Answer
3 years and 5 months = 41 months, 4 years = 48 months
relative schedule ratio = 41/48 = .854, thus SCED = low
EM = 1.08 at SCED = low, so 8% extra effort
b) If the estimated average personnel level was 20 people for 4 years, what will be the estimated personnel level with the constrained schedule? What percent increase is this?
Answer
non-constrained case: 20 people * 48 months = 960 person-months
constrained case: 960*1.08 = 1036.8 person-month
average personnel level = 1036.8 person-months/41 months = 25.3 persons
25.3/20 = 1.26, so this represents a 26% increase
4. Calculate the effort and schedule for the following software project and account for adapted code.
SIZE: new size=300,000 lines of code, modified code size=70,000 lines
of code
COST DRIVERS: SCED = very low, the effect of a software failure is a large
equipment loss, average language and tool experience = 3.1 years, there
is expected to be a major change in the operating system once per year,
use of a comprehensive toolset fully integrated across all activities,
all other cost drivers=nominal (you can round off in the tables; no interpolation
is necessary).
SCALE DRIVERS: all rated at nominal.
a) DM=40, CM=45, IM=60, AA=2, SU=25 for the modified code.
Answer
Cost drivers: SCED = very low (EM=1.23); RELY=high (EM=1.15); LTEX=high
(EM=.9); PVOL=low (EM=.87); TOOL=very high (EM=.75); EAF = 1.23*1.15*.9*.87*.75=.83
For modified code: UNFM not mentioned - choose .4 in middle of range; AAF
= .4*40 + .3*45+ .3*60= 47.5, AAM = (2+ 47.5(1+.02*25*.4)/100 = .59
ESLOC = 300,000 (new) + 70,000* .59 (modified) = 341,300
Effort and schedule: assume all scale drivers = NOMINAL, so B exponent
= 1.16
E = 2.5*341.31.16*.83 = 1801 PM
S = 3*1801 (.33+.2*(1.16-1.01) * .75 = 33.4 months
b) same as above, except CPLX=extra high
Answer
CPLX=extra high (EM=1.65)
E = 1801*1.65 = 2971 PM
S = 3*2971(.33+.2*(1.16-1.01) * .75 = 40 months
5. For a project tradeoff analysis of staffing policies, what percent increase or decrease in total effort would there be for a project if the average language experience of the software personnel was 6 months versus 3 years?
Answer
LTEX rating at 6 months = LOW (EM = 1.11), LTEX rating at 3 years=
HIGH (EM = .9)
1.11/.9= 1.23; 23% additional effort
6. For a project size tradeoff analysis, what would be the relative change in total effort if the application was 300,000 SLOCS versus 250,000 SLOCS with a COCOMO size exponent of 1.15?
Answer
3001.15/2501.15 = 1.23; 23% additional effort
7. The data for a completed project is:
| component | size (KSLOC) |
| A (new) | 210 |
| B (modified) | 150 |
Total project effort was 90000 person-hours.
In component B, 30 out of 100 design modules were modified, 60 KSLOCS
out of the total 150 KSLOCS were modified, and 4000 person-hours of integration
was required (it required 6000 hours of integration when it was developed
new). The modified software is also described as:
structure - high cohesion, low coupling
application clarify - good correlation between program and application
self-descriptiveness - moderate level of comments, headers, documentation.
There was also some module test and evaluation, and documentation required for assessment and assimilation of the modified code.
Using the above data, calculate the following:
(a) calibrate the COCOMO effort equation by solving for the a constant in E=a*(KSLOC)1.2 * EAF, where EAF = 1.3 (assume 152 hours per month) and using the COCOMO 2.0 adaptation adjustment factor AAF = (.4*DM + .3*CM + .3*IM + AA + SU)
Answer
90000 person-hour / 152 hours per person-month = 592.1 person-months
For B, DM = 30/100=30%; CM = 60/150 = 40%; IM = 4000/6000 = 67%; SU: structure=high
(20), application clarify=high (20), self-descriptiveness=nominal (30),
so SU=(20+20+30)/3 = 23; AA = 4; UNFM not mentioned - choose .4 in middle
of range
AAF = .4*30 + .3*40 + .3*67 = 44, AAM = 4 + 44(1+.02*23*.4)/100 = .56
Using eqn. 2 on p. 11, ESLOC = 210,000 (new) + 150,000* AAM (modified)
= 210,000 + .56*150,000 = 294,144
Calibrate: a = 592.1/(2941.2)/1.3 = .497
(b) productivity in equivalent new lines of code per person-month
Answer
294,144 equivalent new lines of code / 592.1 person-months = 496.8
equivalent new lines of code per person-month
8. What is the equivalent lines of code for a product consisting of 100 unadjusted function points implemented in C and 50 unadjusted function points implemented in Ada?
Answer
From Table 11 in the manual, 128 C SLOC/FP and 71 Ada SLOC/FP.
100*128 + 50*71 = 16350 equivalent lines of code
9. Choose between the following testing options using a decision tree analysis. The estimated loss due to a software error is $10M, with an estimated probability of 10% before testing. Show all your work.
| Option #1 | Option #2 | Option #3 (no testing) | |
| Cost | $3.2M | $2M | zero |
| Loss probability after testing | 3% | 8% | 10% |
Answer
Using decision tree, option 1 EV = -3.5 M, option 2EV = -2.8 M, option
1 EV = -1 M; choose option 3
Note: the risk reduction leverage (RRL) of option 1 is .22, RRL of option
2 is .07; choose option 1 for most cost efficient risk reduction