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

The majority charge carriers in p-type semiconductor, The majority charge c...

The majority charge carriers in p-type semiconductor are?? The majority charge carriers are  holes.

Illustrate the concept of hybrid design, Q. Illustrate the concept of Hybri...

Q. Illustrate the concept of Hybrid design? Hybrid design: Pure top-down or else pure bottom up approaches are often not practical so hybrid approach which combines the above

What is bottom-up approach, What is bottom-up approach? System develop...

What is bottom-up approach? System developed starting from detailed modules. Testing begins from the detailed modules and proceeds up to the higher levels of hierarchy.

#title.decision table, You are to create a decision table to help you decid...

You are to create a decision table to help you decide what to do for the day. If it is a weekday and it is not a holiday, then you go to work. However, if it is a weekday and it

What is a vertical microinstruction, What is a vertical microinstruction? ...

What is a vertical microinstruction? Ans) A vertical microinstruction is a microinstruction that states one of a sequence of operations required to carry out a machine language

No , Hard drive has space, but it keeps telling me that its full and asks m...

Hard drive has space, but it keeps telling me that its full and asks me to delete files. I checked. There is nearly full C drives (8GB) but when i am open c drive and check than ne

What is regression testing, Regression testing It is the re-execution o...

Regression testing It is the re-execution of some subset of tests that have already been conducted to make sure the changes that have not been propagated unintended side effect

Hardware and software requirements - cds - isis software, Hardware and Soft...

Hardware and Software Requirements: The present versions of CDS/ISIS require the following minimum hardware and software:  i)  MS-DOS Version: an IBM PC or Compatible micro

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

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