Question: Java Programming: Suppose we are designing a program to sort authors by their names. Author class has the following characteristics: Implements Comparable interface . An
Java Programming:
Suppose we are designing a program to sort authors by their names.
- Author class has the following characteristics:
- Implements Comparable interface.
- An author has first name, last name, and book.
- A constructor that sets the previous 3 properties.
- A compareTo method that compares authors based on their names, starting with last name.
- A class that has the main method, In main:
- You are creating an arraylist of 5 authors, for example:


A class that has the main method, In main: . You are creating an arraylist of 5 authors, for example: Author: Deborah Hopkinson Book: Sky Boys Author: Frank Hiller Book: 388 Author: Nalo Hopkinson Book: Brown Girl in the Ring Author: Henry Miller Book: Tropic of Cancer Author: George R. R. Martin Book: Song of Ice and Fire Output: Problems @ Javadoc Declaration Console X
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
