This sounds like a homework assignment. If it is, you should probably ask your instructor, teacher's assistant, homework tutor, etc... for help. You can also research priority queues online and look for tutorials.
The interface class is easy:
public interface IPriorityQueue
{
bool isEmpty();
bool isFull();
void push(Object o); // add to queue
Object pop(); // remove from queue
int size();
}
Then you'll need to define your class and implement the above functions:
public class PriorityQueue implements IPriorityQueue
{
// interface functions are implemented here
}
I can't guarantee that all my syntax is correct, it's been a while since I've used java. C++ uses abstract base classes with pure virtual functions to achieve creating an "interface" class.
Take care,
Nik
http://www.bigaction.org/