Apr 07: Java Interfaces
Learning Objectives
After today's class, you should be able to:
- Describe the polymorphic algorithms provided by the Java library.
- Implement the
Comparable
interface to allow objects to be sorted. - Use polymorphism to allow for multiple types of specialization.
Lesson Outline¶
Debrief [5 min]
- Solution for HW 7 on Canvas Files
Mini Lecture [5 min]
- Lesson: Algorithms (sorting, searching, etc.)
- Java utility classes: Arrays and Collections
- Example: Algorithms.java and Card.java
- Works because Card implements Comparable
- Notice
Card
is comparable to otherCard
objects
Lab13 [40 min]
Your To-Do List¶
No quiz this week – start the HW today!