程序代写代做代考 graph algorithm 7CCSMASE

7CCSMASE
Tutorial 7 (Week 8) Consider the following program (Euclid¡¯s algorithm):
public int gcd(int x, int y) { int tmp;
while(y!=0){ tmp = x % y; x = y;
y = tmp;
} if(y!=0){
print(¡°Error in computation.¡±); exit(1);
(b) Is it possible to achieve 100% statement coverage for this program? Explain your answer. If some statements are non-coverable, explain why. Is it a problem in the program?
(c) Is it possible to achieve 100% branch (decision) coverage for this program? Explain your answer.
(d) Construct a test suite that has the highest possible statement coverage for this program. How many tests are in this test suite?
}
return x;
//A //B //C //D //E
//F //G //H
// I (a) Draw the Control Flow Graph for the program.
}