Chapter 3 Reduced
Chapter 3 Reduced
Management
Chapter 3
1
What is Project?
A project is a group of tasks that need to complete to reach a clear
result. A project also defines as a set of inputs and outputs which are
required to achieve a goal.
What is software project management?
It is a procedure of managing, allocating and timing resources to
develop computer software that fulfills requirements.
In software Project Management, the client and the developers need
to know the length, period and cost of the project.
Objectives of FPA
The basic and primary purpose of the functional point
analysis is to measure and provide the software
application functional size to the client, customer, and
the stakeholder on their request.
21
Measurements Examples
Parameters
Functional Point
1.Number of Input screen and
(FP) Analysis External Inputs(EI) tables
Following are the points
regarding FPs 2. Number of Output screens and
1. FPs of an application is External Output (EO) reports
found out by counting
the number and types of
functions used in the 3. Number of Prompts and
applications. Various external inquiries interrupts.
functions used in an (EQ)
application can be put
under five types, as 4. Number of Databases and
shown in Table: internal files (ILF) directories
All these parameters are 5. Number of Shared databases
then individually assessed external interfaces and shared 22
for complexity. (EIF)
23
Functional Point (FP) Analysis
2. FP characterizes the complexity of the software
system and hence can be used to depict the project
time and the manpower requirement.
3. The effort required to develop the project depends
on what the software does.
4. FP is programming language independent.
5. FP method is used for data processing systems,
business systems like information systems.
6. The five parameters mentioned above are also
known as information domain characteristics.
7. All the parameters mentioned above are assigned
some weights that have been experimentally
determined and are shown in Table 24
Functional Point (FP) Analysis
Weights of 5-FP Attributes
The functional complexities are multiplied with the corresponding weights against
each function, and the values are added up to determine the UFP (Unadjusted
25
Here that weighing factor will be simple, average, or complex for a measurement
parameter type. 26
Functional Point (FP) Analysis
The Function Point (FP) is thus calculated with the following
formula.
FP = Count-total * [0.65 + 0.01 * ∑(fi)]
= Count-total * CAF
where Count-total is obtained from the above Table.
CAF = [0.65 + 0.01 *∑(fi)]
and ∑(fi) is the sum of all 14 questionnaires and show the
complexity adjustment value/ factor-CAF (where i ranges from 1
to 14). Usually, a student is provided with the value of ∑(fi)
Also note that ∑(fi) ranges from 0 to 70, i.e.,
0 <= ∑(fi) <=70
and CAF ranges from 0.65 to 1.35 because
1. When ∑(fi) = 0 then CAF = 0.65
2. When ∑(fi) = 70 then CAF = 0.65 + (0.01 * 70) = 0.65 + 0.7 =271.35
Data Structure Metrics
Essentially the need for software development and other
activities are to process data. Some data is input to a system,
program or module; some data may be used internally, and
some data is the output from a system, program, or module.
Program Data Input Internal Data Data Output
Payroll Name/Social Security Withholding rates Gross Pay
No./Payrate/ Overtime Factors withholding Net Pay
Number of hours Insurance Premium Pay Ledgers
worked Rates
Spreadsheet Item Names/Item Cell computations Spreadsheet of items
Amounts/Relationshi Subtotal and totals
ps among Items
Software Planner Program Size/No of Model Parameter Est. project effort Est.
28
Software developer Constants project duration
on team Coefficients
Data Structure Metrics
There are some Data Structure metrics to compute the
effort and time required to complete the project. There
metrics are:
1. The Amount of Data.
2. The Usage of data within a Module.
3. Program weakness.
4. The sharing of Data among Modules.
29
Data Sructure Metrics
1. The Amount of Data: To measure the amount of
Data, there are further many different metrics, and
these are:
• Number of variable (VARS): In this metric, the Number
of variables used in the program is counted.
• Number of Operands (η2): In this metric, the Number of
operands used in the program is counted.
η2 = VARS + Constants + Labels
• Total number of occurrence of the variable (N2): In this
metric, the total number of occurrence of the variables
are computed
2. The Usage of data within a Module: The measure
this metric, the average numbers of live variables are
computed. A variable is live from its first to its last
30
references within the procedure.
Data Structure Metrics
Where (LV) is the average live variable metric computed from the ith module.
This equation could compute the average span size (SP) for a program of n
spans.
31
Data Structure Metrics
3. Program weakness: Program weakness depends on its
Modules weakness. If Modules are weak(less Cohesive),
then it increases the effort and time metrics required to
complete the project.
Module Weakness (WM) = LV* γ
A program is normally a combination of various modules;
hence, program weakness can be a useful measure and
is defined as:
WP: Weakness of the program
(FAN-IN * FANOUT)**2
Cyclomatic Complexity
➢ Cyclomatic Complexity is a metric that helps us
measure how complex a particular software
program is. One of the uses of knowing the
Cyclomatic Complexity is that it helps us
understand the extent of unit testing to be done
in order to achieve complete coverage (more
information and links below).
Flow chart is a go-to method to arrive at this
measure.
35
Universal Formula:
❑ Branch Coverage <= Cyclometric Complexity
<= Path Coverage
Replacing our values:
2 <= 3 <= 4 (holds good :))
36
Flow Graph Notation for Program
In the graph, Nodes represent
processing tasks while edges
represent control flow
between the nodes.
37
How to Calculate Cyclomatic Complexity?
The calculation of CC revolves around 2 concepts
❑ Nodes
❑ Edges
Statements in a program are represented as nodes, and
control paths from one statement to another are
represented by Edges.
Cyclomatic Complexity formula
The formula for calculating CC is as:
CC = E~N+2
Where:
E= Number of edges
N= Number of nodes. 38
39
Calculate Cyclomatic complexity
40
Calculate Cyclomatic complexity
Path 1: 1,2,3,5,6, 7
Path 2: 1,2,4,5,6, 7
Path 3: 1, 6, 7
41
Calculate Cyclomatic complexity
i = 0;
n=4; //N-Number of nodes present in the graph
while (i<n-1) do
j = i + 1;
while (j<n) do
if A[i]<A[j] then
swap(A[i], A[j]);
end do;
j=j+1;
end do;
42
Calculate Cyclomatic complexity
Computing mathematically,
V(G) = 9 – 7 + 2 = 4
V(G) = 3 + 1 = 4 (Condition nodes are 1,2 and 3 nodes)
Basis Set – A set of possible execution path of a program
1, 7
1, 2, 6, 1, 7
1, 2, 3, 4, 5, 2, 6, 1, 7
1, 2, 3, 5, 2, 6, 1, 7
43
Calculate Cyclomatic complexity
IF A = 10 THEN
IF B > C THEN
A=B
ELSE
A=C
ENDIF
ENDIF
Print A
Print B
44
Print C
Complexity Number Meaning
Complex Code
10-20 Medium Testability
Cost and effort is Medium
46
Conclusion
❑ Does 100 % branch coverage ensures no
bugs?
Answer is again NO. 100 % branch
coverage is certainly better than
statement coverage and more efficient
but it only ensures that each branch is
executed at least once but again it
doesn’t cover all the possible
combinations (like two Ifs can be tested
with 2 branch test case for TT, FF where
as total possible combination will be 4
(TT,TF,FT,FF) which are not getting
covered here)
47