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

Whta is boundary value analysis, Boundary Value Analysis:    It's widely ex...

Boundary Value Analysis:    It's widely examined that input values at the extreme ends of input domain cause more errors in system. More application errors happen at the boundaries

What are version management tools, What are Version management tools? ...

What are Version management tools? Version and release identification Systems assign identifiers automatically when a new version is submitted to the system. St

How will an engineer assess the safety, How will an engineer assess the saf...

How will an engineer assess the safety?  The risks linked to a project or product must be identified. The purposes of the project or product must be identified and ranked in im

Final Year Project Help, I am currently working on a project and am far fro...

I am currently working on a project and am far from passing, I need help ASAP! The project task is to create a Decision support system for An Airline. It must predict and make de

Case study : online bookshop system, A major book retailer is planning to d...

A major book retailer is planning to develop a computer system to handle their new online bookshop: BooksUniverse.com. You have been chosen to do the analysis and design using Obje

What are the advantages of software maintenance, What are the advantages of...

What are the advantages of Software maintenance Software maintenance is a very broad activity which includes error correction, deletion of obsolete capabilities, enhancement of

Flow chart, desidn a complete flow chart diagram ,which ask the user to inp...

desidn a complete flow chart diagram ,which ask the user to input the rate of diesel and quantity of diesel consumed.after calculate the total amount of diesel consumed and display

Discuss in detail about data modeling, Discuss in detail about data modelin...

Discuss in detail about data modeling. Data modelling makes use of the ERD. Consists of three interconnected information. The data object. Attributes. Relatio

One want record a data driven test then how will one do that, You want to r...

You want to record a data driven test. How will you do that? There are 3 ways to create a data-driven test: a.) By using data from a data table b.) By using data from a f

Define evolutionary prototyping, Evolutionary prototyping: Evolutionary Pr...

Evolutionary prototyping: Evolutionary Prototyping (also called as breadboard prototyping) is quite dissimilar from Throwaway Prototyping. The main goal when using Evolutionary Pr

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