28. Look at program How would you make this program sort in order instead of Java1809.java. decending order. ascending (Hint: It involves changing just 1 character!) 29. Look again at program Aside from the fact that is the what is particularly Java1809.java. Bubble Sort, inefficient about the method used in this program? bubbleSort 30. Why would a method be declared swap private? 31. Look closely at the methods in both programs and bubbleSort Java1809.java Java1810.java. Aside from the method, one other line was changed which makes the sort more efficient. swap What is that change? 32. Look at program This program used a loop for the outer loop in the sort Java1811.java. do…while instead of a loop. Why is that? for 33. Look again at program Java1811.java. How does the know when the list is Smart Bubble Sort sorted?
28. Look at program Java1809.java. How would you make this program sort in decending order instead of ascending order. (Hint: It involves changing just 1 character!) 29. Look again at program Java1809.java. Aside from the fact that is the Bubble Sort, what is particularly inefficient about the bubbleSort method used in this program? 30. Why would a swap method be declared private? 31. Look closely at the bubbleSort methods in both programs Java1809.java and Java1810.java. Aside from the swap method, one other line was changed which makes the sort more efficient. What is that change? 32. Look at program Java1811.java. This program used a do…while loop for the outer loop in the sort instead of a for loop. Why is that? 33. Look again at program Java1811.java. How does the Smart Bubble Sort know when the list is sorted?
Exercises18.01-05.docx