retagged by
1,134 views

2 Answers

0 votes
0 votes
0 votes
0 votes
Operator Frequency
if 1
* 6
== 1
return 2
= 3

Number of unique operators (n1) = 5

Number of operators (N1) = 13

Operand Frequency
temp 2
A1 3
A2 3

Number of unique operands (n2) = 3

Number of operands (N2) = 8
 

N = N1+N2 = 8 + 13 = 21

n = n1+n2 = 5 + 3 = 8

Program Volume (V) = N log2 n

= 21 log28

= 21*3 = 63

Program Difficulty (D) = n1/2 * (N2/n2)
= 5/2 * 8/3
=20/3

Program Effort (E) = D * V

= 20/3 * 63

= 420

[float, ; and () are not considered as operators here while many places they are also considered]

Answer:

Related questions

0 votes
0 votes
1 answer
1
Ishrat Jahan asked Nov 1, 2014
1,308 views
void swap(float* A1, float* A2) { float temp; if (*A1 = = *A2) return; temp = *A1; *A1 = *A2; *A2 = temp; return; }The program volume for the above module using Halstead'...