首页 > 其他 > 详细

软测hw3

时间:2018-03-23 20:53:31      阅读:227      评论:0      收藏:0      [点我收藏+]

一:(a)

技术分享图片

对于图中表示的细节:

1int curPrime....curPrime=2

2~3:numPrimes<n

3:curPrime++;isPrime=true;

4:int i=0

5~6:i<=numPrimes-1

6~7:curPrime%primes[i]==0(T)

6~8:curPrime%primes[i]==0(F)

7:isPrime=false;break;

8:i++

5~9:i>numPrimes-1

9~10:isPrime(T)

9~11:isPrime(F)

2~12numPrimes>=n

12:int i=0

13~14:i<=numPrimes-1

14:system.out.println..

15:i++

13~16:i>numPrimes-1

(b) set MAXPRIMES=4, then t2 will get the resulting array bounds error

(c)n=1

(d)NC:TR={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}

EC:TR={(1,2),(2,3),(2,12),(3,4),(4,5),(5,6),(6,7),(6,8),(7,9),(8,5),(5,9),(9,10),(9,11),(10,11),(11,2),(12,13),(13,14),(13,16),(14,15),(15,13)}

PPC:{(1,2,3,4,5,6,8),(1,2,3,4,5,6,7,9,10,11),(1,2,3,4,5,6,7,9,11),(1,2,3,4,5,9,10,11),(1,2,3,4,5,9,11),(5,6,8,5),(6,8,5,6),(1,2,12,13,16),(1,2,12,13,14,15),{14,15,13,16),(13,14,15,13),(14,15,13,14),(15,13,14,15),(3,4,5,6,7,9,10,11,2,12,13,16),(3,4,5,6,7,9,10,11,2,12,13,14,15),(3,4,5,9,10,11,2,12,13,16),(3,4,5,6,7,9,11,2,12,13,14,15),(3,4,5,9,11,2,12,13,16),(3,4,5,9,10,11,2,12,13,14,15),(8,5,6,8),(6,8,5,9,10,11,2,12,13,14,15),(6,8,5,9,10,11,2,12,13,16),(6,8,5,9,11,2,12,13,14,15),(6,8,5,9,11,2,12,13,16),(8,5,6,7,9,10,11,2,12,13,14,15),(8,5,6,7,9,10,11,2,12,13,15),(8,5,6,7,9,11,2,12,13,14,15),(8,5,6,7,9,11,2,12,13,15),(2,3,4,5,6,7,9,10,11,2),(2,3,4,5,6,8,9,11,2),(2,3,4,5,9,10,11,2)(2,3,4,5,9,11,2}

(e)[1,2,3,4,5,6,8,5,6,7,9,10,11,2,12,13,14,15,13,16]

(f)[1,2,3,4,5,6,8,5,6,7,9,10,11,2,12,13,14,15,13,16],[1,2,3,4,5,9,11,2,12,13,16]

二:基于JunitEclemma实现

技术分享图片

技术分享图片

技术分享图片

 

技术分享图片

 

软测hw3

原文:https://www.cnblogs.com/taehyungv97/p/8634161.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!