max := A(0); | ||
i := 1; | ||
while i < C loop | ||
i := i+1; | ||
if | A(i) > max | |
then max := A(i); | ||
end if; | ||
-- max is the maximum of A(0..i) | ||
end loop |
a) Show what steps must be taken to find test cases for coverage
testing, using this program as an example. Show the distinction
between node-coverage and branch-coverage.
(5 points, 1.5 page)
b) What method(s) of verification are both practical and would likely
reveal the error? Note that C is large. Motivate your answer!
(3 points, 0.5 page)
Software Engineering, Exam, May 15 2000.
The following questions should be answered only by those taking the 4- and 5-point course.