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

What is inheritance, Q. What is Inheritance? Inheritance:- Inheritance...

Q. What is Inheritance? Inheritance:- Inheritance is defined as the property of objects by which instances of a class can have access to data and programs contained in a previ

Explain throw-away prototyping, Throw-away prototyping Objective: ...

Throw-away prototyping Objective: The principal objective of this model is to validate or to derive the system requirements. It is developed to reduce requir

Why software change happens, Why software change occurs? Software chang...

Why software change occurs? Software change occurs because of the following reasons. New requirements appear when the software is used. The business atmosphere changes. E

Define effector process, Define effector process? The effector process...

Define effector process? The effector process is termed as a process that verifies itself. The  effector process exists in specific criteria.

Explain structural testing, Testing that takes into account the internal me...

Testing that takes into account the internal mechanism [structure] of a system or component. Types contain branch testing, path testing, statement testing. Testing to insure eve

What is a user manual, What is A user manual? Ans) A "user manual" is a ...

What is A user manual? Ans) A "user manual" is a document that presents information essential to employ software or a system to get the desired results. Typically, what is expla

Techlib plus - microcomputer based software package, TECHLIB Plus microcomp...

TECHLIB Plus microcomputer based software package: This is yet another comprehensive package based on BASIS plus, one of the world's leading Document DBMS and Text Retrieval S

What is bottom-up testing, Bottom-up testing is a method of integration tes...

Bottom-up testing is a method of integration testing. A test engineer makes and uses test drivers for components that have not yet been developed, because, with bottom-up testing,

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