in IS&Software Engineering edited by
1,091 views
0 votes
0 votes

Consider the following information of a source code. 

  • $10$ operators are used which includes 4 unique operators. 
  • $6$ operands are used which include 4 unique operands. 

Estimate the program length.

  1. $8$
  2. $12$
  3. $32$
  4. $16$
in IS&Software Engineering edited by
1.1k views

2 Answers

0 votes
0 votes
  Total Unique
operators N1 = 10 n1 = 4
operands  N2 = 6 n2 = 4

Program length ( N ) = N1 + N2 = 10 + 6 = 16

Vocabulary (n) = n1 + n2  = 4 + 4 = 8

Volume = $N.log_{2}n = 16.log_{2}8 = 16*3 = 48$

3 Comments

Thanks for the solution. But I do not understand the concept behind it. Can you please post a reference link from where i can study about this topic.
0
0
Thank you :)
0
0
0 votes
0 votes

Estimated program length = $n_1\log_{2}n_1 + n_2\log_{2}n_2 =$ $4\log_{2}4 + 4\log_{2}4 = 8\log_{2}4 = 8*2 = 16.$

Program Length = $N_1 + N_2 = 10 + 6 = 16.$

Difference between two is – Estimated program length is used before the development of the software or program and Program length is calculated after development of software or program.

Formula reference : Page 15

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true