Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create class FillandSortArray FillAnd Sort Array should (all in main): Prompt the user to enter the number of elements desired in array Create a Random

image text in transcribed

Create class FillandSortArray FillAnd Sort Array should (all in main): Prompt the user to enter the number of elements desired in array Create a Random object: Random random = new Random(1234); Create an array of doubles of the desired size Fill array with random numbers from [0,100) - zero to 99.9999999999... usin random.nextDouble; Sort the array by calling Arrays.sort(arrayName) Print out array elements, one per line, using either printin, or printf() with "%s" format specifier. Example (input in green): MYPROMPT>java -jar AutoGrade.jar FillAndSortArray Compilation is successful How many elements in array? 12 Array is correct length (12) 1.5899959834469013 6.977557886640151 Input: 28.387478195313157 After you feel your program is 33.59524025416939 Right Answer: correct, further test your 34.698742873967686 "1.5899959834469013 program, by obtaining 40.653672039922654 6.977557886640151 45.823330506267055 20.387478195313157 AutoGrade.jar from this 61.731407199730306 33.59524025416939 assignment. Put it and a copy of 64.65821682999256 34.690742873967686 your FillAndSort Arrayjava in the 85.75884598868335 40.653672039922654 same directory. Then run it as 94.68595742485053 45.823330506267055 shown in the example, 95.13577109193919 61.731407199738386 64.65821602999256 When your program works

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions