Question: Software testing question which requires to draw a data flow os this code. Using the source code below: public int Fun1(int x, int y){ k

Software testing question which requires to draw a data flow os this code.

Using the source code below:

public int Fun1(int x, int y){

k = 0;

while (x <= 10 && k < 10){

if (x%2 != 0){

k = k + y;

k = k 2;

}

x = x + 1;

k = x + k;

}

if (x < 0){

x = y;

k = k + x;

}

return k;

}

1. Draw a data flow graph for the code.

2. Identify all def use clear paths in your graph.

3. Identify all simple paths in your graph.

5. Identify at least one loop free path in your graph.

6. Identify all p-uses/Some c-uses in your graph.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!