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

Event procedure and a general procedure, (a) Visual Basic is governed by an...

(a) Visual Basic is governed by an event processor. Explain the meaning of this phrase. (b) Differentiate between an event procedure and a general procedure. (c) "For datab

What is integration testing, What is Integration testing: - This test i...

What is Integration testing: - This test is performed to determine the interfaces among system components, interactions between the application and the hardware, file system, a

Explain the types of software testing, Explain the types of software testin...

Explain the types of software testing. Unit testing Integration testing System testing User-acceptance testing End-to-End testing Exception testing

What is recovery testing and security testing, What is recovery testing and...

What is recovery testing and Security testing  Recovery testing is system tests that bind the software to fail in a variety of ways and justify that recovery is correctly perf

Given titles IOT/ IOE, Dear Sir/ Madam I have an 8 page essay to be written...

Dear Sir/ Madam I have an 8 page essay to be written how much I pay per page? Thanks

Write down the schema to represent the current system state, Question: ...

Question: Consider the University modular degree scheme where students choose a selection of modules from a large menu. Here we have the basic types [PERSON, MODULE], the set o

What is a real time system, What is a Real time system? Real time syste...

What is a Real time system? Real time system is a software system in which the correct functionalities of the system are dependent upon results formed by the system and the tim

Stats free, system architecture block diagram

system architecture block diagram

Disadvantage of software package, Disadvantage of Software package: Th...

Disadvantage of Software package: There are some disadvantages which need to be looked into. They are:  i)  A commercial software package will have a number of built-in

Define cyclomatic complexity, Define cyclomatic complexity? Cyclomatic ...

Define cyclomatic complexity? Cyclomatic complexity defined as software metric which gives the quantitative measure of logical complexity of the program. The Cyclomatic comp

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