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

Encapsulation, Illustrate the use of the concept Encapsulation.

Illustrate the use of the concept Encapsulation.

Justify the term software is engineered, Justify the term "Software is engi...

Justify the term "Software is engineered" Software is engineered not manufactured. Although some similarities exit among software development and hardware manufacture, the two

Explain the brooks law, Define Brooks law. Software was delivered late...

Define Brooks law. Software was delivered late, was defective, cost several times the original estimates and often showed poor performance characteristics.

Write about software change methods, Write about software change methods. ...

Write about software change methods. The software change strategies that could be applied individually or together are: Software maintenance - The changes are made in the softw

What is software maintenance, What is software maintenance? Changes to...

What is software maintenance? Changes to the software are made in response to altered requirements but the fundamental structure of the software remains stable.

Project requirements, Leader: Aim/vision of project. Business plan, Screenc...

Leader: Aim/vision of project. Business plan, Screencast coordination, lines of communication, feedback, must give updates during  lecture slot. Evaluated, in part, on how well who

What are the benefits of smoke testing, What are the benefits of smoke test...

What are the benefits of smoke testing? Integration risk is minimized. The quality of the end-product is improved. Error diagnosis and correction are simplified. Asses

Define the quality control, Quality Control Quality control is a method...

Quality Control Quality control is a method in which the product's quality is compared with standards and corrective actions taken if needed. Quality control activities focus o

Explain the regression testing, What is regression testing? Regression...

What is regression testing? Regression testing is the re-execution of some subject texts that have previously been conducted to make sure that changes have not propagated unin

What are the advantages of smoke testing, What are the benefits of smoke te...

What are the benefits of smoke testing? Integration risk is decreased. The quality of the end-product is getting better. Error diagnosis and correction are simplified. Assessme

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