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

What are the characteristics of the software, What are the characteristics ...

What are the characteristics of the software?  Software is engineered, not manufactured.  Software does not wear out.  Most software is custom built rather than being ass

Structural partitioning, compare and contrast the advantages of verticle an...

compare and contrast the advantages of verticle and horizontal structural partitioning?

Static testing tools and dynamic testing tools, Static testing tools: 1...

Static testing tools: 1. Static analysers   2. Code inspectors  3. Standard Dynamic testing tools   1. Coverage analyzers (execution verifiers)    2. Output co

Determine the technique - parallel, Determine the technique - Parallel ...

Determine the technique - Parallel With this approach, old and new systems are run together for a time  -  If new system goes down for any reason, you still have old system

Why software design improve when we use oops concepts, Q. Why does the soft...

Q. Why does the software design improve when we use object-oriented concepts? Ans. The software design gets betters when we use object-oriented concepts because 1.Object-o

Timeline chart, how to make timeline chart for timetable generation system

how to make timeline chart for timetable generation system

What is the meaning of system engineering, What is the meaning of System En...

What is the meaning of System Engineering? System Engineering means designing, deploying, implementing and operating systems which include hardware, software and user.

Mention some of the design principles, Mention some of the Design principle...

Mention some of the Design principles. The design process should not vary from tunnel vision. The design should not reinvent the wheel. The Design should exhibit unifo

What is system simulation, What is System Simulation? Normal 0 ...

What is System Simulation? Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What is the benefit of modular design, What is the benefit of modular desig...

What is the benefit of modular design? Changes made during testing and maintenance becomes manageable and they do not influence other modules.

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