import java.awt.*;

/*
 * This class represents a PriorityQueue that is ordered by due date
 * order of a Job object.  The before method is overridden so that it
 * gives the proper ordering.
 */

/*
 * In order to use this priority queue, the following line in PQTest.java...
 *    private PQJob pq = new PQJob();         // Our PriorityQueue.
 * should be replaced by...
 *    private PQEDD pq = new PQEDD();         // Our PriorityQueue.
 */

class PQEDD extends PriorityQueue {

  // return true iff a is before b
  public boolean before (Object a, Object b) {
    Job jA = (Job) a;
    Job jB = (Job) b;

    return jA.dueDate < jB.dueDate;
  }
}
