www.junit.org
www.objectmentor.com
blog.objectmentor.com
www.junit.org
www.objectmentor.com
blog.objectmentor.com
package primeFactors;
import junit.framework.TestCase;
public class PrimeFactorsTest extends TestCase {
}
No tests found in primeFactors.PrimeFactorsTest
package primeFactors;
public class PrimeFactors {
}
package primeFactors; expected:
import java.util.*;
public class PrimeFactors {
public static List
return new ArrayList
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
return new ArrayList
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
return new ArrayList
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
return new ArrayList
}
}
package primeFactors; varargs expected:<[2]> but was:<[]>
import java.util.*;
public class PrimeFactors {
public static List
return new ArrayList
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
primes.add(2);
}
return primes;
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
primes.add(2);
}
return primes;
}
}
package primeFactors; expected:<[3]> but was:<[2]>
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
primes.add(2);
}
return primes;
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
primes.add(n);
}
return primes;
}
}
package primeFactors; expected:<[2, 2]> but was:<[4]>
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
primes.add(n);
}
return primes;
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
if (n%2 == 0) {
primes.add(2);
n /= 2;
}
if (n > 1)
primes.add(n);
}
return primes;
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
if (n%2 == 0) {
primes.add(2);
n /= 2;
}
if (n > 1)
primes.add(n);
}
return primes;
}
}
package primeFactors; expected:<[2, 2, 2]> but was:<[2, 4]>
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
if (n%2 == 0) {
primes.add(2);
n /= 2;
}
if (n > 1)
primes.add(n);
}
return primes;
}
}
package primeFactors; ! ! !
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
while (n%2 == 0) {
primes.add(2);
n /= 2;
}
if (n > 1)
primes.add(n);
}
return primes;
}
}
package primeFactors; expected:<[3, 3]> but was:<[9]>
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
while (n%2 == 0) {
primes.add(2);
n /= 2;
}
if (n > 1)
primes.add(n);
}
return primes;
}
}
package primeFactors; expected:<[3, 3]> but was:<[9]>
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
int candidate = 2;
while (n%candidate == 0) {
primes.add(candidate);
n /= candidate;
}
if (n > 1)
primes.add(n);
}
return primes;
}
}
package primeFactors; expected:<[3, 3]> but was:<[9]>
import java.util.*;
public class PrimeFactors {
public static List
List
if (n > 1) {
int candidate = 2;
while (n % candidate == 0) {
primes.add(candidate);
n /= candidate;
}
}
if (n > 1)
primes.add(n);
return primes;
}
}
package primeFactors; expected:<[3, 3]> but was:<[9]>
import java.util.*;
public class PrimeFactors {
public static List
List
int candidate = 2;
if (n > 1) {
while (n % candidate == 0) {
primes.add(candidate);
n /= candidate;
}
}
if (n > 1)
primes.add(n);
return primes;
}
}
package primeFactors; expected:<[3, 3]> but was:<[9]>
import java.util.*;
public class PrimeFactors {
public static List
List
int candidate = 2;
if (n > 1) {
while (n % candidate == 0) {
primes.add(candidate);
n /= candidate;
}
}
if (n > 1)
primes.add(n);
return primes;
}
}
package primeFactors; ! ! !
import java.util.*;
public class PrimeFactors {
public static List
List
int candidate = 2;
while (n > 1) {
while (n % candidate == 0) {
primes.add(candidate);
n /= candidate;
}
candidate++;
}
if (n > 1)
primes.add(n);
return primes;
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
int candidate = 2;
while (n > 1) {
while (n % candidate == 0) {
primes.add(candidate);
n /= candidate;
}
candidate++;
}
return primes;
}
}
package primeFactors;
import java.util.*;
public class PrimeFactors {
public static List
List
int candidate = 2;
while (n > 1) {
for (; n%candidate == 0; n/=candidate)
primes.add(candidate);
candidate++;
}
return primes;
}
}
package primeFactors; The algorith is three lines of code!
import java.util.*;
public class PrimeFactors {
public static List
List
for (int candidate = 2; n > 1; candidate++)
for (; n%candidate == 0; n/=candidate)
primes.add(candidate);
return primes;
}
}
Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:
Email: Нажмите что бы посмотреть