Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Practise FillAndSortArrayMethodArgs In Class Program Assignment In-class Practice- FillAndSortArrayMethodArgs COMP B11 Create class FillAndSortArrayMethodArgs FillAndSortArrayMethodArgs should consist of 3 methods: 1. main, which should
Java Practise
FillAndSortArrayMethodArgs In Class Program Assignment In-class Practice- FillAndSortArrayMethodArgs COMP B11 Create class FillAndSortArrayMethodArgs FillAndSortArrayMethodArgs should consist of 3 methods: 1. main, which should Gather 3 arguments from the command line Argument 1: the number of random numbers the user desires Argument 2: the low end of the range of random numbers the user desires Argument 3: the high end (exclusive) of the range of random numbers the user desires Note: you may assume there will always be 3 numbers and that the first will be an integer. Create an array of doubles of the desired size . Call fillArrayRandomO to fill array with random numbers Call Arrays.sort0 to sort array . Call printArray0 to print array Note: To convert the first command-line argument from a String to an int, use Integer parseIntO. Similarly, use Double.parseDouble0 to convert a String to a double. You can read about converting strings to numbers on page 326 of your text and about command-line arguments starting on page 330. 2. void fillArrayRandom(double [ array, double low, double high), which should fill array with random numbers in the range [low, high). As in FillAndSortArray, use Random random new Random(1234): to create the Random object and obtairn your random numbers with random.nextDoubleO 3. void printArray(double [1 array), which should print out array elements, one per line, using either printlnO, or printf() with a "%s" format specifier. Use a for each loop for printing Be sure to add Javadoc comments for both the program and the two methods 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