Using the following source code, answer the questions listed below. (a) Draw a control flow graph to represent the method Fun1, shown above. Label the nodes (starting with
A
) and the outgoing edges of the decision boxes appropriately. (b) Using the line labels in the code for method Fun1, identify all the def-use pairs for the variables
x
, k and
y
. (c) Identify a set of test cases that satisfies the all-defs criterion, for variables
x,k
and
y
in method Fun1. Use trace tables to show how the def-use pairs are covered. If you cannot achieve
100%
coverage for the all-defs criterion please explain why. (d) Identify a set of test cases that satisfies the all-uses criterion, for variables
x,k
and
y
in method Fun1. Use trace tables to show how the def-use pairs are covered. If you cannot achieve
100%
coverage for the all-uses criterion, please explain why.

Respuesta :

A control flow graph to represent the method Fun1  using folloeing source code is here

if (number <0 || digit <0)

return -1

digitcount = 0

while (number >0)

if (number % 10)==digit)

digitcount++

number /=10

return digitcount

When a programmer creates programming statements using a text editor or a visual programming tool, they are typically saved in a file and are referred to as source code. When the source code is combined with a C compiler, an output file known as an object file is created.

Learn more about source code here:

https://brainly.com/question/12951057

#SPJ4

Ver imagen kumarravichandra