Question: instance, if your program is invoked with 1 and 1 0 , your program will print 2 , 3 , 5 , 7 . You
instance, if your program is invoked with and your program will print
You must:
name your main class "PrimeFinder"
put all your programclasses in a package called "prime".
check for errors in command line arguments and handle it properly.
Example Run of the program
The red color indicates the program's output. The dollar sign $ indicates your command line prompt and what follows is what the user types on the command line terminal
Example positive no error:
$ java cp prime.PrimeFinder
Example positive no error:
$ java cp prime.PrimeFinder
Example positive no error:
$ java cp prime.PrimeFinder
Example Negative bad input:
$ java cp prime.PrimeFinder
Error: Max must not be smaller than Min
Example Negative bad input:
$ java cp prime.PrimeFinder abc
Error: Invalid arguments
Example Negative bad input:
$ java cp prime.PrimeFinder
Error: Min out of range. Minimum must not be smaller than
Example Negative bad input:
$ java cp prime.PrimeFinder
Error: Max out of range. Maximum must not be greater than
Example Negative bad input:
$ java cp prime.PrimeFinder
Error: Min and Max must be whole numbers.
Example Negative missing an argument:
$ java cp prime.PrimeFinder
Usage: PrimeFinder
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
