

package hw6;


public class MyQueue<E> implements Queue<E> {

    E [] Q; //the array to store the elements of the queue
    int f,r;//roughly, the front and rear of the queue, but see 5.2.2 of text
    int size;//the number of elements in the queue

    static final int CAPACITY = 1000; //default length of array Q
    int capacity; // actual length of array  Q

    public MyQueue() {
        this(CAPACITY);
    }

    public MyQueue(int cap){
        capacity = cap;
        Q = (E []) new Object[capacity];
        f = 0;
        r = 0;
        size = 0;
    }


}
