title: Assignment involved with creating methods
body: <p>first of all thank you for looking at my question. My assignment is pretty basic to most but I am an inexperienced programmer. Here is the description of the assignment:</p>
  
  <p>Your objective is to write a class called Storage that can hold a collection of Strings. It must implement the following methods:</p>
  
  <ol>
  <li>addItem(String s) - This method accepts a String parameter and returns a boolean value. The parameter reference is then stored internally in your choice of structure. The method returns true if the reference is successfully added.</li>
  <li>getItems() - This method takes no parameters and returns an array containing all the Strings stored in the internal structure. The returned array must not contain any null elements.</li>
  <li>isFull() - This method returns true if there is no internal storage available, otherwise false.</li>
  <li>removeItem(String s) - This method accepts a String parameter and returns a boolean value. The method must search through the internal storage structure and remove the parameter reference (if present). The method returns true if the reference is successfully removed, otherwise false.</li>
  </ol>
  
  <hr>
  
  <h2>I am completely stumped on most of these. I am using an array to store the data, but I am open to other suggestions. Thanks again.</h2>
  
  <p>Alright guys I made a few changes and I started some code, but it won't compile correctly. Based on the description of the methods can someone tell me what I'm doing wrong?</p>
  
  <p>public class Storage {</p>
  
  <pre><code>//variables
  private String[] list;
  private int size = 10;
  private int index = 0;
  
  public boolean addItem(String s) {
      for (int i = 0; i &lt; list.length; i++) {
          if (!list.equals(null)) {
              list[i] = s;
          }
      }
      return true;
  }
  
  public String[] getItems() {
      for (int i = 0; i &lt; list.length; i++) {
          if(!list.equals(null)) {
          System.out.println(list[i]);
          i++;
          }
      }
      return list;
  }
  
  public boolean isFull() {
      if (list.length &gt; size) {
          System.out.println("The array is full");
      }
      return true;
  }
  
  public boolean removeItem(String s) {
      for (int i = index; i &lt; list.length - 1; i++) {
          list[i] = list[i + 1];
      }
      return true;
  }
  </code></pre>
  
  <p>}</p>