The findPrimes() method takes a single int parameter, N, and will display all of the prime numbers, less than or equal to N, in the applet's TextArea. Its algorithm should use a loop to test the numbers between 1 and N and display all the prime numbers in that range. Obviously, this is a counting loop, because you know exactly how many iterations it must make before entering the loop. Also, the task of determining whether an integer is prime or not will be farmed out to the Primes object. Thus, this gives us the following algorithm:
Display "The following are the primes between 1 and N" in TextArea
for each integer, k, the range 1 to N
if k is prime
display k in the TextArea