Arrays in Java

profilejasiqeepngelxo

Arrays in Java

The ability to utilize and sort arrays is a critical skill in any programming language. This week’s lesson will use arrays to store information. An algorithm rearranges the data from smallest to largest values.

  • Selection Sort (8.6.2, pg. 505);
  • Insertion Sort (8.6.3, pg. 511);
  • Bubble Sort (see page 526 for a description of the Bubble Sort Algorithm).

Assignment:

Create an (double) array to store the scores below. Then create a sorting class using one of the above methods. Make sure the sorting class processes double arrays (double[] arrayName;). Create a client class to call the sorting Class. Pass the array of scores to the Sorting class. Sort the array from smallest to largest and printout the sorted array.

53.560.396.253.356.452.776.477.571.078.2
65.259.380.592.185.778.766.288.850.273.4

    • 10 years ago
    • 10
    Answer(1)

    Purchase the answer to view it

    blurred-text
    • attachment
      answer_arrays_in_java.docx