//Written by Jory James

import java.util.Iterator;

public class QueueTest {
    public static void main(String[] args) {
        FixedLengthQueue<Integer> flq = new FixedLengthQueue<>(3);
        System.out.println(flq.capacity());
        flq.add(1);
        flq.add(2);
        flq.add(3);
        System.out.println(flq.size());

        Iterator<Integer> it = flq.iterator();

        while(it.hasNext()){
            System.out.print(it.next() + " ");
        }
        System.out.println();

        System.out.println(flq.remove());
        flq.add(4);

        for(Integer elm : flq){
            System.out.print(elm + " ");
        }
        System.out.println();


        System.out.println(flq.remove());
        flq.add(5);

        for(Integer elm : flq){
            System.out.print(elm + " ");
        }
    }
}
