Provide an implementation of the class Library as well as of BookComparator . Use the provided template
Fantastic news! We've Found the answer you've been seeking!
Question:
Provide an implementation of the class Library as well as of BookComparator. Use the provided template as a starting point for the class Library and the provided template for BookComparator.
import java.util.ArrayList;
public class Library {
private ArrayList
public Book getBook(int i) {
return library.get(i);
}
public int getSize() {
return library.size();
} public void addBook (Book b) {
// Your code here
} public void sort() {
// Your code here
} public void printLibrary() {
// Your code here
}
}
Posted Date: