/* +----------+ | OldBook | +----------+ |int year | +----------+ */ //a predicate to select old books class OldBook implements ISelect{ int year; OldBook(int year){ this.year=year; } //is the given book written before this year public boolean select(Object obj){ return (this.year>((Book)obj).year); } }