/*
* ERModel.java
*
* Created on February 12, 2007, 8:47 AM
*
*/
package emergencyroom;
import java.util.PriorityQueue;
/**
*
* @author Kyle Johnson
*/
public class ERModel
{
PriorityQueue pqueue;
/** Creates a new instance of ERModel */
public ERModel()
{
pqueue = new PriorityQueue();
}
public void schedule(Patient p)
{
pqueue.add(p);
}
public Patient treatNext()
{
return (Patient)pqueue.poll();
}
}