標籤:a.Draw a CFG of the printPrimes() method;b.當MAXPRIMES為3或4時。t2=(n=5)會因為越界而出現fault。但是t1=(n=3)不會出現fault。c.edge (2,12), n=1d.i.Node CoverageTR= {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}ii.Edge CoverageTR= {(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,5),(6,8
標籤:package test;public class test { void printPrimes(int n){ int curPrime; int numPrimes; boolean isPrime; int [] primes = new int [43]; primes[0]=2; numPrimes = 1; curPrime = 2; while (
標籤: 原題中代碼/******************************************************* * Finds and prints n prime integers * Jeff Offutt, Spring 2003 ******************************************************/ public static void printPrimes (int n)
標籤:題目代碼如下: 1 /******************************************************* 2 * Finds and prints n prime integers 3 * Jeff Offutt, Spring 2003 4 ******************************************************/ 5 public static void
標籤:根據printPrimes()代碼複習路徑覆蓋的知識。相關代碼如下:/******************************************************* * Finds and prints n prime integers * Jeff Offutt, Spring 2003 ******************************************************/ public static