Explain your choices in your documentation.

The Eratosthenes sieve is a simple algorithm to find all prime numbers less than a given number.
It proceeds as follow:
make a collection of numbers between 2 and the given number (let’s call it allNumbers)
make an empty collection that will receive all the prime numbers (let’s call it allPrimes)
repeat until allNumbers is empty the following steps
remove the first element of allNumbers, call it prime, and put it in allPrimes
remove all multiple of prime from allNumbers
print all numbers from allPrimes
Implement this algorithm choosing appropriately what collections from the java.util package can be best for allNumbers and allPrimes.
Explain your choices in your documentation.
The deliverables are one Java class, allowing to run the sieve by passing the maximum number on the command line, the design document (no more than one page) explaining the choice of data structures, and a test document explaining how you check the correctness of your program.
Grading rubrics:
Design document: 20% clear explanation of the implementation choices (10% for each collection)
Test document: 20% include 2 examples of runs with an explanation about how you checked the correctness of the results independently of the program. Do not include tests for incorrect input.
Implementation: 20% (correct completion grade)
Code structure: 20%.Use of proper Java constructs
Presentation: 20% (see presentation rubric in week 1 assignment).

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now