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

K-map, m2+m3+m5+m7+m12+m8+m9 simplify using k-map

m2+m3+m5+m7+m12+m8+m9 simplify using k-map

What are the merits of incremental model, What are the merits of incrementa...

What are the merits of incremental model? i. The incremental model can be adopted when there is less number of people included in the project. ii. Technical risks can be ma

State the term software is engineered, Justify the term "Software is engine...

Justify the term "Software is engineered" Software is engineered not manufactured. Although some similarities exist between software development and hardware manufacture, the t

Software testing, Hello, I have an assignment and have to derive a regular ...

Hello, I have an assignment and have to derive a regular expression based on a CFG provided but i dont know how. please help.

Analyses the system design process of a project, Write a report which criti...

Write a report which critically analyses the system design process of a project. Projects might include designing a light rail network for a city, more environmentally-conscious bu

What are the three activities of risk assessment, What are the three activi...

What are the three activities of risk assessment? Ans: The three activities are analyzing, identifying and giving priorities. Risks are able to be identified by a check list

Software availability, Software Availability: In the present day conte...

Software Availability: In the present day context, software suppliers have realised the potential demand and also the special requirements of library and information professio

Why is maintenance of a software important, Q. Why is maintenance of a soft...

Q. Why is maintenance of a software important? Discuss some of the problems that are faced during maintenance of software. Ans: The modification of a software product subsequ

What does a usecase diagram represent, Problem : (a) What does a UseCas...

Problem : (a) What does a UseCase Diagram represent? (b) Draw a UseCase Diagram for the above case study. (c) For any one use case give a detail use case specification.

What is upward compression, What is Upward compression? Ans) In software...

What is Upward compression? Ans) In software design, "upward compression" means a type of demodularization in which a subordinate module is copied into the body of a better modu

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