Determine the cyclomatic complexity, Software Engineering

Assignment Help:

Q. Consider the program given below

void main()

{

int i,j,k;

readln (i,j,k);

if( (i < j) || ( i > k) )

{

writeln("then part");

if (j < k)

writeln ("j less then k");

else writeln ( " j not less then k");

}

else writeln( "else Part"); }

(i) Draw the flow graph. (4)

(ii) Determine the cyclomatic complexity. (4)

(iii) Arrive at all the independent paths. (8)

 

 

Ans:

void main()

{

int i,j,k;

readln (i,j,k);

if( (i < j) || ( i > k) )

{

writeln("then part");

if (j < k)

writeln ("j less then k");

else writeln ( " j not less then k");

}

else writeln( "else Part");

}

206_Determine the cyclomatic complexity.png

(ii) Cyclomatic complexity = E - N + 2 = 12 - 10 + 2 = 4

(iii) The four independent paths are

Path1 : 1 2 3 9 10

Path2 : 1 2 4 5 7 8 10

Path3 : 1 2 4 5 6 8 10

Path4 : 1 2 3 4 5 7 8 10


Related Discussions:- Determine the cyclomatic complexity

Determine the software development models, Determine the Software developme...

Determine the Software development models Software Engineering deals with development of software. Thus, understanding the basic characteristics of software is essential. Softw

Matlab, #This is part of my prog. in matlab and a graph has to be drawn for...

#This is part of my prog. in matlab and a graph has to be drawn for this equation. >> es0=6.11; T0=273.15; Lv=(2.5)*10^6; Rv=461.5; Td=80:.2:500; e=es0*exp((Lv/Rv).*((1./T0)-(1./T

What is flowchart, What is Flowchart? Ans) A diagram showing the sequent...

What is Flowchart? Ans) A diagram showing the sequential steps of a process or of a workflow around a service or product. Formal Review: A technical review conducted with the en

What is branch coverage, What is Branch coverage? Ans) Test coverage cri...

What is Branch coverage? Ans) Test coverage criteria which needs that for each decision point each possible branch be implemented at least once. Syn: decision coverage. Contrast

Advantages of incremental model, Advantages of incremental Model:- ...

Advantages of incremental Model:- As product is to be delivered in parts, total cost of the project is dispersed. Limited number of persons can be put on to the projec

Programming, Write a C program that reads in three integers and then determ...

Write a C program that reads in three integers and then determines and print the largest and smallest integer among them.

What are the main objectives of reverse engineering, Q. Define Reverse Engi...

Q. Define Reverse Engineering? What are the main objectives of reverse engineering? Ans: The reverse engineering is the procedure of generating representations that are imple

Explain evolutionary prototyping, Evolutionary prototyping Objective: ...

Evolutionary prototyping Objective: The principal objective of this model is to deliver the working system to the end-user. Example-AI systems. Advantages

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd