Question: IN JAVA PLEASE: In this assignment you will: query the user for the size of an array. (Keep the array size between 10 and 25.

IN JAVA PLEASE:

In this assignment you will:

  • query the user for the size of an array. (Keep the array size between 10 and 25. Use validation loops.)
  • create and fill that array, arrayOne, with random single precision floating point values.
  • display arrayOne
  • using bubble sort, sort arrayOne in ascending order(low to high)
  • display arrayOne
  • query the user for a range of numbers. (between a high and a low value). Validate that the range is within the range of numbers in the array.
  • create another array, arrayTwo, that will just hold the values from arrayOne that fall in that range and then copy those values into new array. You must preserve the sorted order. (You may want to use a temporary array to hold the found values before you create arryTwo.)
  • display arrayTwo
  • copy the values from arrayTwo into rear of arrayThree, in descending order.
  • display arrayThree
  • I suggest that you create methods that break up the program into smaller processes. This is called the top down approach. This is the methodology I used in the example program we looked at in class.
  • When generating random numbers have them range between 10.00 and 99.99.
  • When displaying arrays restrict the displayed values to 2 decimal places. (use printf() or String.format())

Example:

Please enter the size of array one. 10 12.33, 33.46, 10.09, 99.90, 21.11, 73.20, 52.89, 10.00, 11.74, 40.00 10.00, 10.09, 11.74, 12.33, 21.11, 33.46, 40.00, 52.89, 73.20, 99.90 Enter a range of number to copy to a new array. Please enter the low bound 0 The low bound must be greater than or equal to 10.00 and less than or equal to 99.99 Please enter the low bound 12.3 Please enter the high bound. 10.7 The high bound must be greater than or equal to 10.3 and less than or equal to 99.99 Please enter the high bound 45.3 10.00, 10.09, 52.89, 73.20, 99.90 How many new random numbers would you like to add? 99.90, 73.20, 52.89, 10.09, 10.09

In this assignment you will:

  • query the user for the size of an array. (Keep the array size between 10 and 25. Use validation loops.)
  • create and fill that array, arrayOne, with random single precision floating point values.
  • display arrayOne
  • using bubble sort, sort arrayOne in ascending order(low to high)
  • display arrayOne
  • query the user for a range of numbers. (between a high and a low value). Validate that the range is within the range of numbers in the array.
  • create another array, arrayTwo, that will just hold the values from arrayOne that fall in that range and then copy those values into new array. You must preserve the sorted order. (You may want to use a temporary array to hold the found values before you create arryTwo.)
  • display arrayTwo
  • copy the values from arrayTwo into rear of arrayThree, in descending order.
  • display arrayThree
  • I suggest that you create methods that break up the program into smaller processes. This is called the top down approach. This is the methodology I used in the example program we looked at in class.
  • When generating random numbers have them range between 10.00 and 99.99.
  • When displaying arrays restrict the displayed values to 2 decimal places. (use printf() or String.format())

Example:

Please enter the size of array one. 10 12.33, 33.46, 10.09, 99.90, 21.11, 73.20, 52.89, 10.00, 11.74, 40.00 10.00, 10.09, 11.74, 12.33, 21.11, 33.46, 40.00, 52.89, 73.20, 99.90 Enter a range of number to copy to a new array. Please enter the low bound 0 The low bound must be greater than or equal to 10.00 and less than or equal to 99.99 Please enter the low bound 12.3 Please enter the high bound. 10.7 The high bound must be greater than or equal to 10.3 and less than or equal to 99.99 Please enter the high bound 45.3 10.00, 10.09, 52.89, 73.20, 99.90 How many new random numbers would you like to add? 99.90, 73.20, 52.89, 10.09, 10.09

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!