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

Explain the software architecture, What is software architecture? The ...

What is software architecture? The software architecture of a program or computing system is the structure or structures of the system, which comprises software methods, the e

SQA Planning, Please let me know that through which techniques software qua...

Please let me know that through which techniques software quality assurance is planned?

Explain the basic cocomo model, Question: (a) (i) Define the following...

Question: (a) (i) Define the following terms briefly: COCOMO, DSI, FSP, MM, ACT, TDEV, (MM)AM. (ii) State the assumptions underlying the Basic COCOMO model. (b) Suppos

Explain lines of code (loc), Lines of code (LOC) is a software metric used...

Lines of code (LOC) is a software metric used to calculate the size of a software program by counting the number of lines in the text of the program's source code. LOC is typicall

What are the task involved in design process of sdlc, What are the task inv...

What are the task involved in design process of SDLC General tasks involved in the design process are the following: i)  Design various blocks for overall system processes.

List the pre-requisites for white-box testing, List the pre-requisites for ...

List the pre-requisites for white-box testing The pre-requisites for white-box testing are same to that of black-box testing with one main difference: - During white-box tes

Test-driven software development, A) What is test-driven software developme...

A) What is test-driven software development? Why test-driven software development is significant in agile development approach?   B) Explain how the following software develo

What is the meaning of real time system, What is the meaning of Real time s...

What is the meaning of Real time system? Real time system is a software system where the correct functionalities of the system are dependent upon results evaluated by the syste

What is customer (end user), What is Customer (end user)? Ans) The organ...

What is Customer (end user)? Ans) The organization or individual, internal or external to the producing organization that takes the product.

Define the term - inspection, Define the term - Inspection - An inspec...

Define the term - Inspection - An inspection is more formal than walk through. - It includes 3-8 people - a moderator, reader as well as a recorder to take notes. - Subj

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