/**
 * Simple interface for a list of elements.
 * 
 */
public interface List {
    
    /**
     * Insert an element onto the list.
     * @param element the element to insert
     */
    public void insert (Object element);
    
    /**
     * Delete an element from the list.
     * @param element the element to delete
     */
    public void delete (Object element);
    
    /**
     * Report true if list contains element.
     * @param element the element to check for
     * @return true iff element is in the List
     */
    public boolean contains (Object element);
    
    /**
     * Report number of elements in List.
     * @return number of elements
     */
    public int size ();
}

/**
 * List cell (a helper class; visible to other classes in same package).
 */
class ListCell {
    
    public Object datum;     // Data for this cell
    public ListCell next;    // Next cell
    
    /**
     * Constructor.
     */
    public ListCell (Object datum, ListCell next) {
        this.datum = datum;
        this.next = next;
    }
}
