CS 2114 Lecture Notes - Lecture 19: Comparator, Github, Mobile Suit Gundam

58 views2 pages

Document Summary

Github workshop next week: tuesday, april 4 or wednesday, april 5. Project v preliminary submission is due designs will be due monday, april 9; Project v final submission is due thursday, april 26. Continue with queue/deque/sorting opendsa and homework assignments (due sunday, april 1 and sunday, april 8). Comparable will define how you compare a class with compareto (the class should have a compareto). Implementing comparator lets you create classes that define how to compare two instances of the generic class order in many different ways. Various classes that compare based on different rules/fields. Call a sort method with one comparator object to sort by name and then make another call with a different comparator object to sort on age: example: see m, week 10 ppt. Need to create a new comparator object. If you only want to define one way to compare objects comparable (see m, week 10 ppt).

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents