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

What is user documentation, "User documentation" is a document that explain...

"User documentation" is a document that explains the way a software product or system should be used to get the desired results.

Explain the software scope, Define software scope. The first software p...

Define software scope. The first software project management activity is the determination of software scope. Scope is defined answering the following questions. Context: Wh

Need of data dictionaries, Objectives of Data dictionaries:- 1) A stand...

Objectives of Data dictionaries:- 1) A standard definition of every terms in a system that is each item of data is uniquely identified and defined. 2) Simple cross-referenci

What are different severity ratings in a project, What are different severi...

What are different severity ratings in a project? There can be 4 types of severity ratings in a table: i.) Severity 1 - Showstoppers - Don't allow application to move at

State the coding standards, State the Coding standards Coding standar...

State the Coding standards Coding standards normally give the guidelines about following: i)  Name of the module ii)  External and Internal documentation of source code

SOFTWARE, EXPLAIN COMPONENTS OF DATABASE MANAGEMENT

EXPLAIN COMPONENTS OF DATABASE MANAGEMENT

Explain the instruction pipelines, Explain the Instruction pipelines In...

Explain the Instruction pipelines Instruction pipelines: - An instructin pipeline reads consecutive instructions from memory whereas previous instructions are being implemented

Define the meaning of code inspection, Define the meaning of Code Inspectio...

Define the meaning of Code Inspection - A formal testing technique where programmer reviews source code with a group who ask questions analyzing program logic, analyzing code

Discuss the various strategies of design, Q. Discuss the various strategies...

Q. Discuss the various strategies of design. Which design strategy is most popular and practical? Ans The most commonly utilized software design strategy involved decomposing

Illustrate basic COCOMO model, Q. Illustrate Basic COCOMO model? Basic ...

Q. Illustrate Basic COCOMO model? Basic COCOMO model:- It provides an order of magnitude of cost. This model utilizes estimated size of software project and the type of softwar

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