The Submission class

Open Submission.java in the demo package of the starter code. The Submission class represents a (homework) submission made by a student. Among its attributes are:

private int positionInQueue;
private String student;
private int numPriorSubmission;

All submissions are positioned one after another in order they are received. Submissions are comparable to one another, based on the order they were received (their position in the submission queue).

@Override
public int compareTo(Submission other) {
  return this.positionInQueue - other.positionInQueue;
}

We will use the Submission class to motivate the idea of a priority queue.