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 norman''s seven stages of action, Question: (a) Explain, using...

Question: (a) Explain, using an example, Norman's Seven Stages of Action. (b) You are working for a software development firm. You have been requested by your team leade

Hardware requirements - inmagic plus software package, Hardware Requirement...

Hardware Requirements: INMAGIC Plus software package requires the following computer configuration:  i)  Micro : IBM PC or compatible with a minimum 640 K RAM.  ii)  Ope

Explain communicational cohesion, Communicational cohesion : Communicationa...

Communicational cohesion : Communicational cohesion is when parts of a module are grouped because they operate on the similar data (e.g. a module which operates on the similar reco

Distinguish between alpha and beta testing, Distinguish between alpha and b...

Distinguish between alpha and beta testing.  Alpha and beta testing are the types of acceptance testing.  Alpha test: The alpha testing is attesting in which the version o

What is black box testing, Write short note on black box testing. The b...

Write short note on black box testing. The black box testing is also known as behavioural testing. This process fully focuses on the functional requirements of the software. Te

What is software re-engineering, What is software re-engineering? No fu...

What is software re-engineering? No functionality is added to the system. Rather than, the system is modified to compose it easier to understand and change. System re-engineeri

What are the debugging programs, Q. What are the Debugging programs? De...

Q. What are the Debugging programs? Debugging programs:-A program which runs simultaneously with the program under test and provides commands to examine memory and registers st

Software configuration management , Software configuration management is a...

Software configuration management is an umbrella activity which is applied by the software procedure. SCM identifies controls, audits and reports modifications that invariably occ

Business intelligence, What are the advantages and disadvantages of using a...

What are the advantages and disadvantages of using a Business Intelligence (BI) software system in a small/medium level business?

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