COMP 202 Lecture Notes - Lecture 23: Selection Sort
![COMP 202 Full Course Notes](https://new-docs-thumbs.oneclass.com/doc_thumbnails/list_view/2177048-class-notes-ca-mcgill-comp-202-lecture10.jpg)
100
COMP 202 Full Course Notes
Verified Note
100 documents
Document Summary
Comp202 lecture 23 final and inheritance. Everything up to, and including. Immutable and mutable reference types. Classes and objects: public/private, static/non- static constructors attributes methods (get/set, overloading,) Exceptions (checked and uncheked) try/catch, try/finally, try/catch/finally. Errors (compile- time, run- time, logic, style) Sorting algorithms are algorithms that put elements of a list/array in a defined order. In general, when choosing an algorithm you want to think about its computational complexity and the memory usage (http://bigocheatsheet. com/). Goal: order an array of integers in ascending order. Procedure: select the smallest element in the unsorted part of the array. Swap that element with the element in the initial position of the unsorted array. Change where you divide the array from the sorted part to the unsorted part. In java, classes can be derived from other classes. A class that is derived from another class is called a subclass. The class from which the subclass is derived is called a superclass.