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 sanity testing, Determine the Sanity testing - Sanity te...

Determine the Sanity testing - Sanity testing is used to ensure that conflicting or multiple functions or variables don't exist in system. - It verifies that components of

Equivalence class testing, Equivalence class testing Equivalence class ...

Equivalence class testing Equivalence class testing is based on partitioning the input domain of a program into a number of equivalence classes so that the test of a representa

Discuss software characteristics, Q. Discuss any two software characteristi...

Q. Discuss any two software characteristics. Ans. Software is not manufactured : The life of software is start from concept exploration to the retirement of the software prod

Explain the static testing and dynamic testing, Static testing and dynamic ...

Static testing and dynamic testing Static testing is checking the application without actually running the application while dynamic testing checks the application by running i

Define top-down testing, Define top-down testing. System developed star...

Define top-down testing. System developed starting from most general modules. Testing begins from the most general module.

Some important steps while doing testing, Some Important Steps while doing ...

Some Important Steps while doing performing testing The below objectives are to be kept in mind when performing testing: i)  It should be done with the intention of finding

Determine the working of developer of software, Determine the working of de...

Determine the working of developer of Software As developer of Software and user of Software became separate organisation, business concepts such as software costing, Software

Determine the principle stages of vord method, What are the principle stage...

What are the principle stages of VORD method? Viewpoint identification: Identify the services provided to each point of view Viewpoint structuring: Sorting related viewpoint

Explain test plan, Documentation specifying the scope, approach, resources,...

Documentation specifying the scope, approach, resources, and schedule of intended testing activities. It signifies test items, the features to be tested, the testing tasks, respons

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