Oose Unit5
Oose Unit5
Object-Oriented Software
Estimation
After the requirements are gathered, the customer may like to know the cost and time estimates
of the project. In order to determine the cost and time of a project, estimates of size and effort
are required. Providing accurate estimates for any software project is an important activity.
Unfortunately, determining estimates in the early phases of software development is difficult due
to lack of information available about the system at such an early stage. However, early estimates
are highly desirable in order to determine the feasibility of a project or to bid for a tender. The
importance of realistic estimates can be best explained by an example.
Suppose we want to construct our home and we have received many quotations mostly
around ` 30 lakh. We select a builder who offers to do this job in 6 months for ` 25 lakh. The
contract is signed and the builder begins the work. After about 2 months, the builder comes
and demands ` 4 lakh extra and another 2 months for the same job. This is a real problem for
us as we can neither arrange for more loan nor wait for 2 more months. After a great deal of
discussion, we were forced to stop the construction. This was a great loss to us and to the builder
as well. The real problem was that the builder made unrealistic or probably poor estimates.
The above is a classic example of lack of estimation capabilities of the builder. Thus, providing
realistic estimates is essential to project planning process. By using estimations, the project can
be measured and controlled. In order to conduct effective software estimates, we must identify:
Scope/boundaries of the project
Size of the project
Effort of the project
Resources required in the project
Risk involved in the project
123
124 Object-Oriented Software Engineering
In this chapter, the object-oriented methods for estimating size and effort are presented.
These methods can be used in requirement and design phase of software development life cycle
in order to estimate effort. The process of risk management is also presented so that uncertain
and critical activities can be identified in the early phases of software development.
The functionality of an object-oriented software can be depicted using use cases and these
use cases are transformed using classes. Thus, the effort can be estimated using the size measures
computed for object-oriented products.
EXAMPLE 4.1 An application consists of 15 scenario scripts and requires 15 person days to
implement each class. Determine the effort of the given application.
Solution Number of classes = 17 × Scenario scripts
= 17 × 15 = 255
Effort = 255 × 15 = 3825 person days
EXAMPLE 4.2 Consider the database application project with the following characteristics:
1. The application has 45 key classes
2. A graphical user interface is required
Calculate the effort to develop such a project given 20 person days.
Solution Number of key classes = 45
Number of support classes = Number of key classes × Multiplier
= 45 × 2.5
= 112.5
Total number of classes = Number of key classes + Number of support classes
= 112.5 + 45
= 157.5
126 Object-Oriented Software Engineering
Effort = 157.5 × 20
= 3150 person days
The unadjusted actor weight (UAW) is the weighted sum of actors. Mathematically,
n
UAW = Â ai ¥ wi
i =1
where n is the number of actors, ai is the ith actor and wj is the value of weighting factor of the
ith actor.
The use cases are ranked according to their complexity: simple, average or complex. The
criteria for classifying a use case are given in Table 4.2. There are two methods for classifying
use case complexity:
1. A use case may be classified as simple, average or complex based on the number of
transactions. A transaction can be defined as a collection of activities that are counted
by counting the use case steps.
2. The other method to classify the use case is counting the analysis objects which are
counted by determining the number of objects that we will need to implement a use case.
128 Object-Oriented Software Engineering
Each use case is multiplied by its corresponding weighting factors and this sum is added to
get unadjusted use case weight (UUCW). Mathematically,
m
UUCW = Â ui ¥ wi
i =1
where m is the number of use cases and ui is the ith use case.
A system requirement other than those concerned with information content intrinsic to and
affecting the size of the task, but not arising from the project environment.
TCFs vary depending on the difficulty level of the system. Each factor is rated on the scale of
0 to 5 as shown in Figure 4.3. Table 4.4 shows the weights assigned to the contributing technical
factors.
EXAMPLE 4.3 Consider an airline reservation system where the following information is
available:
Number of actors: 05
Number of use cases: 10
Assume all complexity factors are average. Compute the use case points for the project.
Solution
5
UAW = Â ai ¥ wi
i =1
= 5 ¥ 2 = 10
Object-Oriented Software Estimation 131
10
UUCW = Â ui ¥ wi
i =1
= 10 ¥ 10 = 100
UUCP = UAW + UUCW
= 10 + 100 = 110
13
TCF = 0.6 + 0.01 Â Fi ¥ wi
i =1
= 0.6 + 0.01 ¥ (3 ¥ 2 + 3 ¥ 1 + 3 ¥ 1 + 3 ¥ 1 + 3 ¥ 1 + 3 ¥ 0.5
+ 3 ¥ 0.5 + 3 ¥ 2 + 3 ¥ 2 + 3 ¥ 1 + 3 ¥ 1 + 3 ¥ 1 + 3 ¥ 1)
= 0.6 + 0.01 ¥ 42 = 1.02
8
ECF = 1.4 + ( -0.03) Â Fi ¥ wi
i =1
= 1.4 + ( -0.03) ¥ (3 ¥ 1.5 + 3 ¥ 0.5 + 3 ¥ 0.5 + 3 ¥ 1
+ 3 ¥ 1 + 3 ¥ -1 + 3 ¥ -1 + 3 ¥ 2)
= 0.995
UCP = UUCP ¥ TCF ¥ ECF
= 110 ¥ 1.02 ¥ 0.995
= 111.639
2¥2 = 4
1¥3 = 3
UAW = 2 + 4 + 3 = 9
8
UUCW = Â ui ¥ wi
i =1
= 2 ¥ 5 + 4 ¥ 10 + 2 ¥ 15 = 10 + 40 + 30 = 80
UUCP = UAW + UUCW
= 9 + 80 = 89
13
TCF = 0.6 + 0.01 Â Fi ¥ wi
i =1
EXAMPLE 4.5 Consider Example 4.4 and calculate the effort for the given application.
Solution
Effort = UCP × 20
= 133.46 × 20
= 2669.2 person hours
Object-Oriented Software Estimation 133
EXAMPLE 4.6 Consider the following use case model of result management system:
The number of transactions required for each use case is given as follows:
Assume all complexity factors are average. Compute the use case points and effort for the
project.
Solution
Use cases Complexity
Maintain student details 15
Maintain course details 15
Maintain result details 10
Generate reports 5
View results 5
Login 10
(Contd.)
134 Object-Oriented Software Engineering
(Contd.)
Actors Complexity
Data entry operator 2
Administrator 2
Student 1
Faculty 1
UUCP 66
13
TCF = 0.6 + 0.01 Â Fi ¥ wi
i =1
In the CP2 measure, NOA is also considered; thus, a detailed insight into the estimate of size
is obtained. Tables 4.8 to 4.10 show the details for classifying class complexity for CP2 measure
on the basis of NEM, NSR and NOA.
136 Object-Oriented Software Engineering
After classifying the complexity level of classes, the TUCP is calculated as follows:
4 3
TUCP = ÂÂ wi j ¥ xij
i =1 j =1
Object-Oriented Software Estimation 137
where wij is complexity weights j ( j is low, average, high) assigned to class type i. xij is the number
of classes of type i (i is type of class problem domain, human interface, data management and
task management).
Fi Description Fi Description
1 Data communication 10 Reusability
2 Distributed functions 11 Ease of installation
3 Performance 12 Ease of operation
4 High used configuration 13 Multiple users
5 Transaction rate 14 Facilitation of change
6 Online data entry 15 Adaptability by user
7 End-user efficiency 16 Rapid prototyping
8 Online update 17 Multiuser interaction
9 Compiler processing 18 Multiple interfaces
Figure 4.5 Computing technical complexity factor.
Two measures CP1 and CP2 have been described. The CP1 measure can be used in early phases
of software development and the CP2 measure can be used when the number of attributes is
available.
Assume all the technical complexity factors have average influence. Calculate class points.
Solution
= 6 × 2 + 10 × 2 + 12 × 4 + 7 × 1 + 4 × 1 + 5 × 2 + 8 × 1 + 6 × 1 + 9 × 1
= 12 + 20 + 48 + 7 + 4 + 10 + 8 + 6 + 9
= 124
18
TCF = 0.55 + 0.01 Â Fii
i =1
EXAMPLE 4.8 Consider a result management system with the following information:
Solution
= 0.55 + 0.01(14 × 3 + 2 × 4 + 1 × 5 + 1 × 2)
= 0.55 + 0.01 × 57 = 1.12
CP1 = 65 × 1.12 = 72.8
CP2 = 65 × 1.12 = 72.8
Effort = 0.843 × CP1 + 241.85 = 303.22 person hours
Effort = 0.912 × CP2 + 239.75 = 306.14 person hours
The internal classes are the classes that reside inside the application boundaries and the
external classes are the classes that reside outside the application boundaries. The services are
the methods defined in the class. Figure 4.6 depicts the method to compute the object-oriented
concepts in object point method. For each external/internal class, it is necessary to compute the
number of data element types (DETs) and record element types (RETs). The DETs correspond
to the total number of attributes of a class and the RETs correspond to the total number of
subclasses of a class (descendants of a class) as shown in Figure 4.7. In inheritance hierarchy, the
classes that inherit the properties of the base class while having their own properties are known
as subclasses.
Consider that the example of the result calculation of a student is shown. The class model is
given in Figure 4.8.
In Table 4.16, the RET and DET are calculated for each class shown in Figure 4.8.
Table 4.17 shows the values of complexity types (high, average, low) for internal classes,
external classes and services.
After classifying the internal classes, external classes and services, these are multiplied by
their complexity values. Finally, the results are summed up using the following formulas:
n
IC total = Â ICi
i =1
m
EC total = Â ECi
j =1
o
Stotal = Â Si
k =1
where n is the number of internal classes, m is the number of external classes and o is the
number of services.
The classes in the given example are internal, hence the occurrences of internal classes
are multiplied with their corresponding weights and summing all the resulting values, we get
IC = 4 × 7 = 28. The concrete services in the classes are 5. Assuming that the methods have
average complexity (as their signature is not given in the example), the services are 5 × 4 = 20.
Finally the adjusted object points are calculated by multiplying UOP by AF as follows:
OP = UOP × AF
The above classes contain six methods with high complexity and the complexities of the
adjustment factors are average. Compute object points.
146 Object-Oriented Software Engineering
Solution
ICtotal = 3 × 7 + 1 × 10 = 31
ECtotal = 1 × 7 = 7
Stotal = 6 × 6 = 36
UOP = ICtotal + ECtotal + Stotal
= 31 + 7 + 36 = 74
14
AF = 0.65 + 0.01 Â Fi
i =1
Steps 1–3 are carried out iteratively in order to identify, analyse, prioritize and reduce risks.
The risks should be identified and appropriate plans must be made to reduce the high prioritized
risks. After reducing the high prioritized risks, the impact of reducing these risks should be
reanalysed and also risks that may have been introduced should be identified. For example, if a
new technology is introduced in order to resolve risk for delay in the schedule of the software.
However, the hiring of new experts might introduce new risks. After identifying new risks, the
risk reduction and removal activities may be planned again.
The stakeholders must go through the risk checklist given in Table 4.18 and identify the
risks specific to their project.
On the basis of the case study on “Library Management System” given in Chapter 3, the
potential problems are identified. The risk exposure factor is calculated for each potential
problem which is the multiplication of probability of occurrence of the problem and impact
of that problem on software operation. The risk analysis and prioritization table is given in
Table 4.20.
150 Object-Oriented Software Engineering
The potential problems ranked by the risk exposure factor are R3, R4, R9, R2, R7, R5, R6, R8,
R10, R1. A risk matrix may be used to capture the potential risks. The probability of problem
and impact of problem values may be classified as urgent, high, medium, and low based on their
rankings. Tables 4.21 and 4.22 show the probability of occurrence of the problem and impact
with their corresponding types of risks, respectively. The values obtained on the scale of 1–10
are changed on the scale of 0 to 1.
Risk matrix is a popular tool for designing prioritization schemes. The probabilities of
estimates on the scale of 1–10 are required in order to construct a risk matrix. The probability
and impact values may be categorized as urgent, high, medium, and low. These two values are
essential for prioritizing risks. After the risks are ranked, the urgent and high priority risks
should be reduced first.
The estimated durations of activities given in Table 4.23 are used to illustrate the construction
of networks by the CPM.
Forward Pass
In the forward pass, the earliest date of the event is calculated. The forward pass of the example
given in Table 4.23 is shown in Figure 4.12. Using Figure 4.12 and Table 4.24, the forward pass
is carried out as follows:
1. Activities A and B may start immediately, so the earliest start date for both the events
is 0.
2. Activity A will take 5 months to complete, hence the earliest end date is 5 for this
activity.
3. Activity B will take 1 month to complete, hence the earliest end date is 1 for
activity B.
4. Activity C must begin after the completion of activity A, hence the earliest start date
for activity C is 5 months and the earliest end date is 7 months (duration of activity C is
2 months).
5. Activity D must also begin after the completion of activity A. The earliest start date is
5 months and the earliest end date is 8 months.
6. Similarly, the start date and the end date are calculated for all the other activities.
Backward Pass
Now, we follow the backward pass in order to compute the latest dates till when the project must
be started and finished without any delay in the project. Figure 4.13 and Table 4.25 show the
calculation of the latest date for each event of the project.
After identifying the critical path, the activities with slack value zero are identified to be
risky and critical and are cause of concern.
EXAMPLE 4.11 Consider the description of a set of activities given below. Draw the CPM
chart and identify high risky activities.
Solution The forward pass is given in Figure 4.15 and the data is given in Table 4.26.
(Contd.)
Object-Oriented Software Estimation 157
Table 4.26 Table after forward pass (Contd.)
Activity Duration (months) Earliest start date Earliest end date
E 2 3 5
F 4 5 9
G 2 9 11
H 1 3 4
I 2 11 13
J 4 13 17
The backward pass is shown in Figure 4.16 and the final data is given in Table 4.27.
The final CPM chart is shown in Figure 4.17. The critical path is A-E-F-G-I-J.
Draw the CPM chart. Find out the project completion time and the critical path.
Solution The forward pass of the above problem is shown in Figure 4.18 and the table for the
forward pass is shown in Table 4.28. The backward pass is shown in Figure 4.19 and the data for
the backward pass is given in Table 4.29.
Object-Oriented Software Estimation 159
The nodes in the PERT network are divided into four quadrants as shown in Figure 4.21.
In the forward pass, we calculate the expected duration as shown in Figure 4.22. Table 4.31
shows the expected time of the project. Unlike the CPM technique, the PERT is based on the
expected date instead of the earliest date by which the project must be completed. Thus, the
PERT deals with the uncertainties involved in durations. The three estimators put emphasis on
the fact that we are uncertain about the future happenings and thus the approximate estimate of
the durations is taken.
162 Object-Oriented Software Engineering
The degree of uncertainty can be measured by the calculation of standard deviation (SD)
which is calculated by using the following formula:
b-a
SD =
6
The SD is proportional to the difference between pessimistic and optimistic activity durations.
This measure can be used to rank the activities by calculating the probability of uncertainty of
meeting the target date. Figure 4.23 shows the SD of the project. Two standard deviations cannot
be added; thus, they are calculated as follows:
(SD1 )2 + (SD2 )2
Object-Oriented Software Estimation 163
The SD for event 2 is 0.5 as it depends only on activity 1. For event 3, there are two
possibilities (A + E or B). Thus, the total SD is given by
The PERT uses the following steps to compute the probability of meeting the target durations:
Calculate the Z value for each event corresponding to its target date.
Convert the Z values to probabilities of meeting or missing the targets.
The Z value for each event is calculated by using the following formula:
TT - t
Z =
SD
where TT is target time.
If we want to complete the event 5 in 9 months, the Z value for event 5 is:
9-8
Z = = 1.886
0.53
By seeing the table of normal distribution, we conclude that there is 0.89 probability of meeting
the target date. Thus, there is 11% risk of not meeting the target date at the end of month 9.
After calculating the probabilities of meeting the target dates, we can rank the risk by their risk
percentage. Using these rankings, we can find out which activity is more uncertain and a cause
of concern.
EXAMPLE 4.13 For the following software project, draw the PERT chart and identify the
critical path.
164 Object-Oriented Software Engineering
Solution The PERT chart and its corresponding table are given in Figure 4.24 and Table 4.32,
respectively.
(a) Using the PERT, compute the expected time and the standard deviation required to
complete each activity.
(b) Draw a network diagram and find the critical path. What is the expected length of the
critical path?
(c) Assuming that the normal distribution applies, compute the probability that path A-C-D
will be completed in at most 16 days.
(d) How much time must be allowed to achieve a 95% confidence of timely completion?
Solution The PERT chart and its corresponding table are given in Figure 4.25 and Table 4.33,
respectively.
Review Questions
1. What is the need for object-oriented software estimation techniques?
2. Describe any two object-oriented size estimation techniques.
3. An application consists of 20 scenario scripts and requires 17 person days to implement.
Determine the effort of the given application.
4. Describe the steps in the use case points method to calculate effort. Why is the use case
points method becoming acceptable in the industry?
5. Compute the value of the use case points for a project with the following information
domain characteristics:
Number of actors: 3
Number of use case: 8
Assume all complexity factors to be average.
6. What metrics can be used to estimate the size of an object-oriented software product?
How is the use case points metric advantageous over the function point metric? Explain.
7. Describe the use case points method with a suitable example.
8. Describe the class point method in detail.
9. Explain the type of classes identified in the class point method. Identify the type of
classes for result management system.
10. What is the purpose of CP1 and CP2 measures? In which software development life
cycle phase can they be calculated?
Object-Oriented Software Estimation 167
11. Consider a project with the following parameters:
Assume all the technical complexity factors have average influence. Calculate CP1, CP2
and effort using class point method.
12. Compare and contrast function point method and object-oriented function point method.
13. Explain all the element types that are used to count object-oriented concepts in the
object-oriented function point method.
14. Describe the steps for calculating object points.
15. Establish the relationship between function point method and object-oriented function
point method.
16. Discuss the method for calculating object-oriented concepts in object point method.
17. Assume that a project has five classes with DET and RET values given below:
The above classes contain four methods with high complexity and the complexities of
the adjustments factors are average. Compute object points.
168 Object-Oriented Software Engineering
18. Consider the following class model. Determine DET and RET for each class.
19. Consider the example given in Question 18. Calculate unadjusted object points. Assume
all the services to be of average complexity.
20. What is risk? Describe the various risk ratings.
21. Describe the framework for managing risks.
22. What are the risk management activities? How can risks be prioritized?
23. Consider the result management system. Analyse and prioritize the various kinds of
risks associated with such a project.
24. Discuss the risk list given by Boehm.
25. What is risk exposure? Describe the method to prioritize risks.
26. Explain the steps in constructing a CPM network model with an example. Explain the
importance of critical path.
27. How can PERT be used in risk analysis? How can we identify uncertainties in activities
using the PERT chart?
28. Explain with examples the importance of PERT and CPM charts.
29. Draw the CPM network for the project specification given in the table below. Explain
each step of the network in detail. Identify the critical path.
31. What do you mean by risks in software projects? How does risk management tackle
these risks? What procedure is usually followed?
32. What do you understand by a “critical path” in a project schedule? Bring out the
importance of software project estimation in the context of software project management.
33. How can PERT be used to evaluate the effects of uncertainty? Explain with an example.
34. Consider the following data for a given project. Draw the PERT chart using the given
information. For the due date 20, 24 and 25, calculate the percentage of risks.
35. You are given the following data concerning the activities in a project (numbers refer to
weeks):
170 Object-Oriented Software Engineering
(a) Using the standard PERT approximation formulas, compute the expected time and
the variance required to complete each activity.
(b) Draw a network diagram and find the critical path by inspection. What is the
expected length of the critical path?
(c) Assuming that the normal distribution applies, compute the probability that the
critical path will take between 25 and 32 days to complete.
(d) How much time must be allowed to achieve a 95% confidence of timely completion?
20. In the object-oriented function point, the number of complexity adjustment factors is:
(a) 15 (b) 18
(c) 14 (d) 20
21. Risk is defined as:
(a) Probability × priority (b) Probability × size
(c) Priority × size (d) Probability × impact
22. Which one of the following is not a risk management activity?
(a) Risk identification (b) Risk activation
(c) Risk prioritization (d) Risk monitoring
23. Risk mitigation activities include:
(a) Reducing probability of risk (b) Increasing probability of risk
(c) Reducing impact of risk (d) None of the above
24. CPM stands for:
(a) Critical path methodology (b) Cost path method
(c) Crucial path method (d) Critical path method
25. The events in the CPM are divided into four quadrants. These quadrants present:
(a) Event number, standard deviation, latest date, slack
(b) Event number, earliest date, latest date, slack
(c) Event number, estimated time, latest date, slack
(d) Event number, earliest time, estimated date, slack
26. Forward pass in CPM includes the calculation of:
(a) Earliest date (b) Latest date
(c) Estimated date (d) Standard deviation
27. Backward pass in CPM includes the calculation of:
(a) Earliest date (b) Latest date
(c) Estimated date (d) Standard deviation
28. Critical path in CPM consists of events with:
(a) Slack > 1 (b) Slack > 2
(c) Slack = 0 (d) Slack > 20
29. PERT stands for:
(a) Program estimation review technique
(b) Program estimation resource technique
(c) Program evaluation review technique
(d) Process evaluation review technique
30. Z values can be connected to probabilities using:
(a) Normal distribution (b) T-test
(c) F-test (d) Z-score distribution
Object-Oriented Software Estimation 173
Further Reading
The report by David N. Card focuses on object-oriented software measurement which can be
found in:
Card, D., Emam, K. and Scalzo, B., Measurement of Object-oriented Software Development
Projects, http://sern.ucalgary.ca/courses/SENG/693/F00/readings/OO%20Measurement %20
-%20March%202001.pdf, 2001.
The following research papers provide a framework on estimating use case points:
Banerjee, G., Use Case Points: An Estimation Approach, http://www.bfpug.com.br/Artigos/
UCP/Banerjee-UCP_An_Estimation_Approach.pdf, 2001
Roy, K. Clemmons, Project estimation with use case points. CROSSTALK The Journal of
Defense Software Engineering, February 2006.
Ferens, D., Fischman, L., Fitzpatrick, T., Galorath, D., and Tarbet, D., Automated Software
Project Size Estimation via Use Case Points. El Segundo: Galorath Incorporated, 2002.
A detailed explanation of use case point method with example case study may be obtained from:
Kirsten, R., Estimating Object-Oriented Software Projects with Use Cases. Master of Science,
Thesis 7th November 2001.
Other useful research papers may be:
Minkiewicz, A., Measuring object-oriented software with predictive object points. Proc.
ASM’97—Applications in Software Measurement, Atlanta, 1997.
Moser, S., Measure and Estimation of Software and Software Processes. PhD Thesis, University
of Berne, Switzerland, 1996.
Antoniol, G., Lokan, C., Caldiera, G., and Fiutem, R., A function point-like measure for object-
oriented software. Empirical Software Engineering, 4(3): 263–287, 1999.
An excellent tutorial on risk management is given by Boehm in:
Boehm, B., IEEE Tutorial on Software Risk Management. New York: IEEE Computer Society
Press, 1989.
Chapter 6 of the book by Galorath and Evans discusses the measures for estimating object-
oriented projects:
Galorath, D.D. and Evans, M.W., Software Sizing, Estimation, and Risk Management.
Philadelphia, PA: Auerbach Publications, 2006.
Hughes and Cotterell provide an introduction to risk management in Chapter 7 of the book:
Hughes, B. and Cotterell, M., Software Project Management. New Delhi: Tata-McGraw Hill,
2009.