Software provided:
Classes that represent a list of books with author information, where author information includes the name and year of birth.
Interfaces IFilter and IFilter2 with examples of use.
File objlists.java
Goals
Learn to define and work with lists of Objects
Learn to define interfaces and design classes that implement them
Learn to use interfaces to design classes that encapsulate only behavior
Details
A list of Objects
Open the file objlists.java.
Draw by hand a class diagram that represents these classes.
Add two of your favorite books (and their authors) to the examples and to one of the lists in the examples and add tests that use your examples.
Make examples of lists of Authors.
Add the method remove(Object obj) that produces a list with only the first occurrence of the given object removed from the list.
Using an interface
class Book implements the interface IFilter. Study the code. Study the code that implements orMap. Add two more test cases to the test suite.
Modify the class Author, so it implements the interface IFilter to select authors born after 1945.
Add tests that verify the implementation of the methods orMap and howMany on your list of authors.