why Interfaces Are Useful
We are going to write a class that sorts some of the classes we have already written –namely : the Account and Student classes that we wrote in the past. Specifically, this class is going to sort Student and accounts by their grade point averages and their account balances , respectively..
Organizer Skeleton class (You only have to fill in 1 method)
Class : Organizer
- The constructor is completely written for you already. It creates an array of Accounts and an array of Student. It also sends the arrays to both of the sort methods described below. You only need to write 1 method : public static void sort (Student arr) which is described below.
- Sort Methods
What if we wanted to sort the PlayList class and add the method void sort(PlayList lists)?