@@ -0,0 +1,1889 @@
+import java.util.*;%0A%0A/*********************************************************************%0A * %0A * Class Name: My_Element%0A * Author/s name: Pedro-Manuel G%C3%B3mez-Portillo L%C3%B3pez%0A * Release/Creation date: 19th November 2014%0A * Class version: v1.0%0A * Class description: This class reflects the object of a the element %0A * %09%09%09%09%09that will be part of each Node of the tree%0A * %0A **********************************************************************/%0A%0Apublic class My_Element %7B%0A%0A%09private int key;%0A%09private List%3CBox%3E boxList;%0A%0A%0A%09/*********************************************************************%0A%09 * %0A%09 * Method name: My_Element%0A%09 * %0A%09 * Name of the original author: Pedro-Manuel G%C3%B3mez-Portillo L%C3%B3pez%0A%09 * %0A%09 * Description of the Method: Constructor method of the class%0A%09 * %0A%09 * Calling arguments: %0A%09 * %09%09- int key: this variable will store the key of the element%0A%09 * %09%09of the node of the binary search tree%0A%09 * %0A%09 * Return value: void %0A%09 * %0A%09 * This method does not require any file%0A%09 * %0A%09 * This method does not throw any particular exception%0A%09 * %0A%09 *********************************************************************/ %0A%09public My_Element(int key) %7B%0A%09%09this.key = key;%0A%09%09boxList = new LinkedList%3CBox%3E();%0A%09%7D%0A%0A%09public int getKey() %7B%0A%09%09return key;%0A%09%7D%0A%0A%09public void insertBoxInElement(Box b)%7B //ordenar las cajas por almacen%0A%09%09int i;%0A%09%09boolean continuar = true;%0A%09%09for( i=0; i%3CboxList.size() && continuar; i++)%7B%0A%09%09%09if(b.getStorageUnit_id().compareTo(boxList.get(i).getStorageUnit_id()) %3C 0)%7B //if b is lexicographically bigger than boxList(i) it returns %3E 0%0A%09%09%09%09boxList.add(i,b);%0A%09%09%09%09continuar = false;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if(i == boxList.size()) boxList.add(b);%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return %22(key=%22 + key + %22, boxList=%22 + boxList.toString() + %22)%22;%0A%09%09//return %22(key:%22 + key+%22)%22; //print only the keys%0A%09%7D%0A%0A%09public Box getFirstBox() %7B%0A%09%09return ((LinkedList%3CBox%3E) boxList).peek();%0A%09%7D%0A%0A%0A%7D%0A

Create My_Element.java