Mar 30: Java Interfaces
Learning Objectives
After today’s class, you should be able to:
- Describe the polymorphic algorithms provided by the Java library.
- Implement the
Comparableinterface to allow objects to be sorted. - Use polymorphism to allow for multiple types of specialization.
Lesson Outline
Debrief [10 min]
- PA 1 solution on Canvas Files
Mini Lecture [10 min]
- Lesson: Algorithms (sorting, searching, etc.)
- Java utility classes: Arrays and Collections
- Example: Algorithms.java and Card.java
- Works because Card implements Comparable
- Notice
Cardis comparable to otherCardobjects
Lab13 [30 min]