A.draw a CFG of the Printprimes () method;
B.
When Maxprimes is 3 or 4 o'clock. T2= (n=5) will appear fault because of the crossing. But t1= (n=3) does not appear fault.
C.
Edge (2,12), n=1
D.
I.node Coverage
tr= {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}
Ii. Edge Coverage
tr= {(), (2,3), (3,4), (4,5), (5,6), (6,7), (7,5), (6,8), (8,9), (5,9),
(9,10), (9,11), (10,11), (11,12), (2,12), (12,13), (13,16), (13,14), (14,15), (15,13)}
Iii. Prime Path Coverage
tr= {[1,2,3,4,5,6,8,9,10,11],[1,2,3,4,5,6,8,9,11],[1,2,3,4,5,6,7],[1,2,3,4,5,9,10,11],[1,2,3,4,5,9,11],[ 1,2,12,13,16],[1,2,12,13,14,15],
[2,3,4,5,6,8,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],
[3,4,5,6,8,9,10,11,2,12,13,16],[3,4,5,6,8,9,10,11,2,12,13,14,15],[3,4,5,6,8,9,11,2,12,13,16],[ 3,4,5,6,8,9,11,12,13,14,15],[3,4,5,9,10,11,2,12,13,16],[3,4,5,9,10,11,2,12,13,14,15],[3,4,5,9,11,2,12,13,16],[ 3,4,5,9,11,2,12,13,14,15],[3,4,5,6,8,9,10,11,2,3],[3,4,5,6,8,9,11,2,3],[3,4,5,9,10,11,2,3],[3,4,5,9,11,2,3],
[4,5,6,8,9,10,11,2,3,4],[4,5,6,8,9,11,2,3,4],[4,5,9,10,11,2,3,4],[4,5,9,11,2,3,4],
[5,6,8,9,10,11,2,3,4,5],[5,6,8,9,11,2,3,4,5],[5,9,10,11,2,3,4,5],[5,9,11,2,3,4,5],[5,6,7,5],
[6,8,9,10,11,2,3,4,5,6],[6,8,9,11,2,3,4,5,6],[6,7,5,6],[6,7,5,9,10,11,2,3,4,5,6],[6,7,5,9,11,2,3,4,5,6],[ 6,7,5,9,10,11,2,12,13,16],[6,7,5,9,10,11,2,14,15],[6,7,5,9,11,2,12,13,16],[6,7,5,9,11,2,14,15],
[7,5,6,7],[7,5,6,8,9,10,11,2,3,4],[7,5,6,8,9,11,2,3,4],[7,5,6,8,9,10,11,2,12,13,16],[7,5,6,8,9,11,2,12,13,16], [7,5,6,8,9,10,11,2,12,13,14,15],[7,5,6,8,9,11,2,12,13,14,15],
[8,9,10,11,2,3,4,5,6,8],[8,9,11,2,3,4,5,6,8],
[9,10,11,2,3,4,5,6,8,9],[9,11,2,3,4,5,6,8,9],
[10,11,2,3,4,5,6,8,9,10],[10,11,2,3,4,5,9,10],
[11,2,3,4,5,6,8,9,10,11],[11,2,3,4,5,9,10,11],[11,2,3,4,5,6,8,9,11],[11,2,3,4,5,9,11],
[13,14,15,13],[14,15,13,14],[14,15,13,16],[15,13,14,13],[15,13,16]}
Software Testing Fundamentals (English version) P63 question Seventh