Question: Use the following code to answer questions 2 - 4 : 2 . Draw a flow graph to represent the method Fun. Label the nodes
Use the following code to answer questions :
Draw a flow graph to represent the method Fun. Label the nodes starting with A and the outgoing edges of the decision boxes appropriately.
Identify the set P of paths in the flow graph for Fun and a set of test inputs that satisfy for each of the following criteria. You are required to show trace tables for each set of inputs used to achieve the criteria. If coverage cannot be obtained, explain why.
i statement coverage
ii branch coverage
iii. multiple condition coverage MCC
Compute the number of basis paths in the flow graph in Question
public int Funint x int k int y
int i ;
while i x
if x
k y x;
k y i;
else
x k ;
y y x;
k x y;
i i ;
if x y
k y x;
else
k y x;
return k;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
