
/* Implements the Queue data structure. */

public class Queue {

  private size;
  private capacity;
  private String[] queueArray;

  public Queue(int capacity) {
    this.capacity = capacity;
    this.queueArray = new String[capacity];
  }

  protected void enqueue(String item) {

  }

  protected String dequeue() {

  }

  protected void hasCapacity() {

  }

  protected void isEmpty() {

  }

}

@@ -70,16 +70,20 @@
 private 
+int 
 size;%0A  
@@ -90,16 +90,20 @@
 private 
+int 
 capacity
@@ -254,81 +254,561 @@
   pr
-otected void enqueue(String item) %7B%0A%0A  %7D%0A%0A  protected String dequeue() %7B%0A
+ivate void _shiftQueue() %7B%0A    for(int i = 1; i %3C this.queueArray.length; ++i) %7B%0A      this.queueArray%5Bi - 1%5D = this.queueArray%5Bi%5D;%0A    %7D%0A    this.queueArray%5BqueueArray.length - 1%5D = null;%0A    return;%0A  %7D%0A%0A  protected void enqueue(String item) %7B%0A    if (this.hasCapacity()) %7B%0A      this.queueArray%5Bsize%5D = item;%0A      this.size++;%0A    %7D%0A    return;%0A  %7D%0A%0A  protected String dequeue() %7B%0A    if (this.isEmpty()) %7B%0A      String dequeuedItem = this.queueArray%5B0%5D;%0A      this._shiftQueue();%0A      this.size--;%0A      return dequeuedItem;%0A    %7D%0A    return null;
 %0A  %7D
@@ -821,20 +821,23 @@
 otected 
-void
+boolean
  hasCapa
@@ -841,24 +841,125 @@
 apacity() %7B%0A
+    return this.size %3C this.capacity;%0A  %7D%0A%0A  protected boolean isEmpty() %7B%0A    return this.size == 0;
 %0A  %7D%0A%0A  prot
@@ -973,24 +973,155 @@
 oid 
+d
 is
-Empty() %7B%0A%0A  %7D%0A
+playQueue() %7B%0A    for (String item : this.queueArray) %7B%0A      if (item != null) %7B%0A        System.out.println(item);%0A      %7D%0A    %7D%0A    return;%0A  %7D
 %0A%7D%0A

Implement base Queue class.