PRG/421 Week 5 Java 5.20 LAB: Descending selection sort with output during execution

Availability: In stock

Regular Price: $7.00

Special Price: $5.00

OR

PRG/421 Week 5 Java 5.20 LAB: Descending selection sort with output during execution

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

Quick Overview

PRG/421 Week 5 Java 5.20 LAB: Descending selection sort with output during execution


Write a void method selectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The method should use nested loops and output the array after each iteration of the outer loop, thus outputting the array N-1 times (where N is the size). Complete the main() to read in a list of up to 10 positive integers (ending in -1) and then call the selectionSortDescendTrace() method.


If the input is:
20 10 30 40 -1


then the output is:
40 10 30 20
40 30 10 20
40 30 20 10

Regular Price: $7.00

Special Price: $5.00

Details

PRG/421 Week 5 Java 5.20 LAB: Descending selection sort with output during execution

Write a void method selectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The method should use nested loops and output the array after each iteration of the outer loop, thus outputting the array N-1 times (where N is the size). Complete the main() to read in a list of up to 10 positive integers (ending in -1) and then call the selectionSortDescendTrace() method.

If the input is:
20 10 30 40 -1

then the output is:
40 10 30 20
40 30 10 20
40 30 20 10

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.