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

Explain in detail about structural modelling, Explain in detail about Struc...

Explain in detail about Structural Modelling. Structural model contains a detail refinement of ERD, data flow model and control flow model. Creating an ERD. Examp

Illustrate about the software process technology, Illustrate about the  SO...

Illustrate about the  SOFTWARE PROCESS TECHNOLOGY   Software industry considers software development like a process. According to Rumbaugh and Booch, "A process defines who is

What do you mean by static analysers, Q. What do you mean by Static analyse...

Q. What do you mean by Static analysers? Static analysers A static analyser operates from a pre-computed database of descriptive information derived from the source text of t

Give explanation about the incremental model, Give explanation about the in...

Give explanation about the incremental model. - Have same phases as the waterfall model. - Phases are as follows: Analysis. Code. Design. Test. Incre

What is validation testing, What are the conditions exists after performin...

What are the conditions exists after performing validation testing? After performing the validation testing there exists two conditions. The function or performance characteris

Explain data accuracy, Data accuracy Don't collect redundant data  T...

Data accuracy Don't collect redundant data  The questions to be answered should be decided in advance and the needed data identified. Tell people why the data is being co

Differentiate between circuit switching and packet switching, Question: ...

Question: (a) Differentiate between circuit switching and packet switching. (b) Using an example, explain the main parts that form a URL (Uniform Resource Locator). (c)

What is software metric, What is software metric? A Software metric is...

What is software metric? A Software metric is a easy quantitative measure derivable from any attribute of the software life cycle (E.g.) LOC (Line Of Code) Function poin

Determine the latest trend in software engineering, Determine the Latest tr...

Determine the Latest trend in software engineering Latest trend in software engineering includes the concepts of software reusability, reliability, scalabilityetc. More and mo

What is test incident report, A document reporting on any event that happen...

A document reporting on any event that happens during testing that needs further investigation.

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