Use the following methods trash() and takeOut() to answer questions (a) – (d). public void trash (int x) { int m, n; m = 0; if (x > 0) m = 4; if (x > 5) n = 3*m; else n = 4*m; int o = takeOut (m, n); System.out.println ("o is: " + o);} public int takeOut (int a, int b) { int d, e; d = 42* a; if (a > 0) e = 2*b+d; else e = b+d; return (e);} (a) Draw separate graph for each trash() and takeOut() , then show the connection between them at call site, using the line numbers given on graph’s nodes. (b) Determine Caller, Callee, Callsite, Actual parameters and Formal parameters, in table. (c) Give all Coupling DU-pairs of last-defs and first-uses, in table. (d) find the values of m, n, a, d, b, e and o when x = -1 , 3 , 6 , in table.
Use the following methods trash() and takeOut() to answer questions (a) – (d).
public void trash (int x)
{ int m, n;
m = 0;
if (x > 0)
m = 4;
if (x > 5)
n = 3*m;
else
n = 4*m;
int o = takeOut (m, n);
System.out.println ("o is: " + o);}
public int takeOut (int a, int b)
{ int d, e;
d = 42* a;
if (a > 0)
e = 2*b+d;
else
e = b+d;
return (e);}
(a) Draw separate graph for each trash() and takeOut() , then show the connection between them at call site, using the line numbers given on graph’s nodes.
(b) Determine Caller, Callee, Callsite, Actual parameters and Formal parameters, in table.
(c) Give all Coupling DU-pairs of last-defs and first-uses, in table.
(d) find the values of m, n, a, d, b, e and o when x = -1 , 3 , 6 , in table.

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









