## Design test cases for loop testing, Software Engineering

Assignment Help:

Q. Regard as a program that reads a set of Data for 'n' no. of triangles. The program reads three integer values like representing the sides of triangles. The program prints for each triangle whether the triangle is isosceles or equilateral or a simple. Develop logic as well as do the following:

(i) Compute cyclomatic complexity?

(ii) Design test cases for loop testing?

Ans.                 The program logic will be like follows:

Enter three sides of a triangle.

If(a

Then is_a_triangle=TRUE

Else is_a_triangle=FALSE;

IF is_a_triangle

Then

If(a=b)XOR(a=c)XOR(b=c) AND NOT ((a=b)AND(a=c))

Then print "Triangle is Isosceles"

If(a=b)AND(b=c)

Then print "Triangle is Equilateral"

If(a<>b)AND (a<>c) AND(b<>c)

Then print "Triangle is scalene"

Else

Print "Not a triangle"

The flow graph of the problem is given as in

the fig:

(i) There are 6 independent paths i.e.

1,2,3,9,14

1,2,4,5,6,8,11,13,14

1,2,3,5,6,8,11,13,14

1,2,4,5,6,7,8,11,13,14

1,2,4,5,6,8,10,11,13,14

1,2,4,5,6,8,11,12,13,14

Cyclomatic complexity is 6 (ii) Few test cases are: #### What is software, What is Software Software is nothing but a collecti...

What is Software Software is nothing but a collection of computer programs that are related documents that are indented to give desired features, functionalities and good per

#### Microcomputer software packages:, MICROCOMPUTER SOFTWARE PACKAGES:  Th...

MICROCOMPUTER SOFTWARE PACKAGES:  There are a number of possibilities for using microcomputers in libraries and centres. What the microcomputer can accomplish is limited by tw

#### What is function point, Q. What is function point? Ans. Function po...

Q. What is function point? Ans. Function point methods the functionality from the user point of view that is on the basis of what the user request and receives in return. C

#### Show the different levels of cmm, Q. Show the Different levels of CMM? ...

Q. Show the Different levels of CMM? 1) Initial (maturity level 1)- At this the lowest level there are fundamentally no sound software engineering management practices in plac

#### Write the definition of design process, Write the definition of design proc...

Write the definition of design process. Design process is a sequence of steps carried by which the requirements are transformed into a system or software model.

#### Different phases of spiral model, Four Different Phases of spiral model are...

Four Different Phases of spiral model are: 1) Planning  2) Risk analysis 3) Development 4) Assessment

#### Decision table, how to draw decosion table? questions based on decision tab...

how to draw decosion table? questions based on decision table.

#### State the term software is engineered, Justify the term "Software is engine...

Justify the term "Software is engineered" Software is engineered not manufactured. Although some similarities exist between software development and hardware manufacture, the t

#### What is fault tree analysis, What is Fault Tree Analysis? Ans) A form of...

What is Fault Tree Analysis? Ans) A form of safety examines that assesses hardware safety to give failure statistics and sensitivity analyses that point to the possible effect o  