标签:
(a)控制流图如下:
(b)令MAXPRIMES=4,会出现越界错误。
(c)令n=1,不会经过while循环体。
(d)节点覆盖:{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
边覆盖:{(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(6,8),(8,5),(5,9),(7,9),(9,10),(10,11),(9,11),(11,2),(2,12),(12,13),(13,14),(14,13),(13,15)}
主路径覆盖:{(3,4,5,6,7,9,10,11,2,12,13,15),(3,4,5,6,7,9,10,11,2,12,13,14)}
(e)图中实现节点覆盖而非边覆盖的测试路径:
{(1,2,3,4,5,6,8,5,6,7,9,10,11,2,12,13,14,13,15)}
(f)图中实现边覆盖而非主路径覆盖的测试路径:
{(1,2,3,4,5,6,7,9,10,11,2,3,4,5,6,8,5,9,11,2,12,13,14,13,15)}
软件测试第三次作业——7.使用下面方法printPrimes()完成后面的问题(a)~(f)
标签:
原文地址:http://www.cnblogs.com/TJUMomonga/p/5342519.html