O'Reilly logo

Agile Java™: Crafting Code with Test-Driven Development by Jeff Langr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 5. Interfaces and Polymorphism

In this lesson you will learn about:

• sorting

• interfaces

• the Comparable interface

if statements

• enumerated types using enum

• polymorphism

Sorting: Preparation

image

The school needs a report of all course sessions. You must sort the report first by department, then by course number. This implies that all courses for a given department will be listed together. The groups of departments will be ordered in ascending alphabetical order. Within a department, the sessions will be ordered by course number.

To get started, get a simple report working of all course sessions. Don't worry yet about its order.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required