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

How to ensure the smooth implementation of system, Probelm: (a) Compare...

Probelm: (a) Compare Supply Chain Management (SCM) and Customer Relationship Management (CRM) . How are they similar? How are they different? Your answer should show the differ

What is equivalence partitioning, What is Equivalence Partitioning? Eq...

What is Equivalence Partitioning? Equivalence Partitioning (EP) is the process of methodically decreasing the huge set of possible test cases into a much smaller but still equ

Analysis and design techniques - unified modeling language, Case Study: ...

Case Study: LHM is a London based privately owned hospital which provides healthcare to its patients.  The hospital uses in-house software to manage and service its patients whi

Supermarkets, A supermarket requires to develop software to encourage regul...

A supermarket requires to develop software to encourage regular customers. For this the customer requires to supply his name address telephone number and driving license number. A

Illustrate the method of user documentation, Illustrate the method of User ...

Illustrate the method of User documentation This usually comprises: -  How to load/run the software -  How to do a search   -  How to save files   -  How to do pri

Hotel reservation, how to make pseudo code of hotel reservation

how to make pseudo code of hotel reservation

Define software testing, Define software testing. Software testing is a...

Define software testing. Software testing is a process used to help recognize the correctness, completeness and superiority of developed computer software. With that in mind, t

What is utilization, Normal 0 false false false EN-IN ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

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

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