Question
Write a program in Java that will output all prime numbers up to a given upper bound (integer N which is a program input) in
Write a program in Java that will output all prime numbers up to a given upper bound (integer N which is a program input) in a computationally efficient manner using Eulers sieve algorithm (section in http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes ).
The program should take an input value N and a filename as a command line parameter and write the output to the file with that name (either creating a new file or overwriting the old one if it exists).
Comments should be provided for the implementation of the method that implements the sieve. Comments should be in javadoc format so that to produce a simple API documentation automatically.
The files of the problem should be archived into one archive file named PrimeNumbers
Classes should be in package primeNumbers.
The archive file should contain:
UML class diagram for the program generated by the SDE plug-in
Source code
API docs produced by javadoc
An output file with programs results
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started