.. This file is part of the OpenDSA eTextbook project. See .. http://opendsa.org for more details. .. Copyright (c) 2012-2020 by the OpenDSA Project Contributors, and .. distributed under an MIT open source license. .. avmetadata:: :author: Molly Domino Comparing and Sorting ===================== Objectives ---------- Upon completion of this module, students will be able to: * Describe concepts of ordering and sorting * Develop methods to compare primitives and Objects * Describe and develop classes which implement the Comparable interface or the Comparator interface * Describe the behavior of various sort methods including: bubble sort, selection sort, and insertion sort * Discuss the relative efficiencies of various sort methods * Implement, test, and use various sort methods and methods which support comparisons * Identify when to use the Comparable interface vs the Comparator interface Introduction to Ordering, Comparing, and Sorting ------------------------------------------------ [13:39] Introduction to Sorting and Comparing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. raw:: html