Chapter 9, Sorting Array Elements Using the Bubble Sort Algorithm, TWO TRUTHS & A LIE, Exercise 01
Page 423
TWO TRUTHS & A LIE
In an ascending bubble sort, you compare pairs of items, swapping them if they are out of order, so that the largest items "bubble" to the top of the list, eventually creating a sorted list.
When you sort objects, you usually want to sort based on a particular object field.
When you make a swap while sorting an array of objects, you typically swap entire objects and not just the field on which the comparison is made.