Professional Documents
Culture Documents
Roll: 17IT8029
SDLC
1. For each of the following documents, indicate in which phase(s) of the software life cycle it is
produced: final user manual, architectural design, SQA plan, module specification, source
code, statement of work, test plan, preliminary user annual, detailed design, cost estimate,
project plan, test report, documentation.
Ans->
documentation->Implementation phase
2. Order the following tasks in terms of the waterfall model: acceptance testing, project planning,
unit testing, requirements review, cost estimating, high level design, market analysis, low-level
design, systems testing, design review, implementation, requirement specification.
Ans->
Market analysis->project planning->cost estimating->requirement specification ->requirements
review->high-level design-> low-level design->design review->implementation->unit testing-
>systems testing-> Acceptance testing.
A phased life cycle model provides a framework that emphasizes planning and control to try
to achieve predictability over project costs and schedules. The phased life cycle improves the
visibility of the project. The project can be managed by using the phases as milestones.
More detailed phases will allow closer monitoring of progress.
SOFTWARE METRICS
2. In Halstead’s metrices, what is the significance of: (i) operators and operands (ii) potential
operands, (iii) Length (iv) Estimated length (v) Volume (vi) Potential volume (vii) Implementation
Level?
Ans->
i)Operators and operands: Operands are tokens that has a value. Variables & constants are
operands. Everything else is an operator.
Ii)Potential operands: Potential operands consist of minimal set of values needed to implement any
algorithm.
It includes values read in; parameters passed in & global values accessed within the algorithm.
(iii) Length: The length of the program in tokens is equal to the total count of operators N1 & the
total count of operands N2
(iv) Estimated length: This gives an estimate of the size of the program based on number of
operators & operands
(vi)Potential volume: It is the minimal size of a solution to a problem solved in any language
Halstead assumes there would be only two operators in this implementation, the name of the
function & the grouping operator
(vii) Implementation Level: The ratio of the minimal (potential) volume to the actual volume relates
how close the current implementation is to minimal implementation as measured by the potential
volume. It is expressed as:
• L = V*/V
Expression for effort: Effort required to implement an algorithm is given as E = V/L and the unit is
emd where V is the volume and L is the level.
Expression for time: The time needed to implement the algorithm is given by
4. Why is the number of decisions +1 an important method for calculating McCabe’s cyclomatic no.?
5. Why is monotonicity an important characteristic of a size or effort metric such as Halstead’s effort
metric?
Ans-> Monocity is an important characteristic of a size or effort matric because adding more code
can cause the value of the effort metric to decrease, then the metric’s behaviour is not
understandable. It may also mean that the metric is manipulated.
(Ans: Complexity is not readily measurable because complexity is not well defined and each one has
different interpretation. There are many aspects of complexity and each person may have a slightly
different interpretation of complexity. It is interaction between person and code that makes it
difficult to define.
7. Calculate McCabe’s complexity on the following source code. Draw a control flow graph.
Read x, y, z;
Type = ‘scalene’;
Print type;
Complexity: Complexity is given by M=E-N+2 where E is the no of edges, N is the number of nodes
M= 12 – 9 + 2=5
8. Calculate Halstead’s basic measures on the triangle code of earlier problem.
operators: == 5 times, >= 3 times, <= 3 times, = 5 times, Read 1 time, type 5 times, ‘scalene’ 1
(23,7)time, ‘isosceles’ 1 time, ‘equilateral’ 1 time, ‘not a triangle’ 1 time, ‘bad inputs’ 1 time, if 4
times,(8,5)
() 4 times ; 7 times, print 1 time (12,3)
operands: x 9 times,y 7 times z 6 times ,0 3 times
Basic count
eta1 = 15
eta2 = 4
êta total = 19
eta2* = 3
N1 = 43
N2 = 25
N = 68
Est N = 15 * log2 15 + 4 * log2 4 = 15 * 3.9 + 4 * 2.0 = 58.5+ 8.0 = 66.5
V = 68 * log2 19 = 68 * 4.24 = 288.32
V* = 5 log2 5 = 5 * 3.2 = 11.6
L = 4.8 / 98.8 = 0.04
E=V / L=288.32/.04=7208
T=E / S=E / 5=1441.6
{ if (n= = 0)
{ return 1;
else
{ return n*fact(n-1);
Ans->
operators: int 2 times; ( ) 3 times; { } 3 times; if 1 times; == 1 times; return 2 times; ‘‘;’’ 2 times;
else 1 times; * 1 times; —1 times.
DESIGN
1. What is modularity?
• Ans->Modularity is the process of partitioning a system into modules which are separately
solvable & modifiable separately. A module is a logically separable part of a program. It is a
program unit that is discrete & identifiable with respect to compiling & loading. In terms of
common programming language constructs, it can be a macro, a function, a procedure, sub-
routine, a process or a package.
2. Draw a modular structure of compiler. 2. What is difference between functional and data
abstraction. Illustrate with the example of compiler.
----Data abstraction-> Data abstraction refers to providing only essential information about
the data to the outside world, hiding the background details or implementation. Data
abstraction enforces a clear separation between the abstract properties of a data type and
the concrete details of its implementation. For example, in case of compiler, we compile our
file we get the compiled file without knowing the details like tokens, lexemes, syntax
analyser etc.
OODM-> OOM is a system development approach encouraging and facilitating re-use of software
components. With this methodology, a computer system can be developed on a component basis
which enables the effective re-use of existing components and facilitates the sharing of its
components by other systems. Through the adoption of OOM, higher productivity, lower
maintenance cost and better quality can be achieved.