// class ListWithCurrent
// ----------------------------------------------------------------------
// The class ListWithCurrent keeps track of a list of Objects, and
// also has a marker that keeps track of a "current" object within the list.  
// "current" is the first thing inserted into the ListWithCurrent, unless
// it has been moved by a method.

class ListWithCurrent {

    // Data members go here.
    // You must implement this with a doubly-linked list.


    // Return the position of the current Object relative to the front
    // of my list, or -1 if my list is empty.  The front Object is counted
    // as element 0.
    public int indexOfCurrent() {
    }

    // Remember the current object in the list.
    public void rememberCurrent() {
    }

    // Restore the current marker to what it was when we last called 
    // rememberCurrent.
    // Precondition: Must have previously called rememberCurrent.
    public void restoreCurrent() {
    }

    // Set the current location to be the first element in my list.
    public void resetCurrent() {
    }

    // Insert o at the beginning of my list.
    // If this is the first object to be inserted, then it will become the
    // current object.
    public void insertAtFront(Object o) {
    }

    // Insert o at the end of my list.
    // If this is the first object to be inserted, then it will become the
    // current object.
    public void insertAtBack(Object o) {
    }

    // (Not called by the simulator.)
    public void insertAfterCurrent(Object o) {
    }

    // Place o at the current location in my list.  That is, overwrite
    // whatever object is there now with the new object.
    // If there is no current location (because the list is empty),
    // make a first list element, put o into it, and make it the current.
    public void placeAtCurrent(Object o) {
    }

    // (Not called by the simulator.)
    public boolean isEmpty() {
    }

    // (Not called by the simulator.)
    public boolean isFull() {
    }

    // Return the number of Objects I have.
    public int size() {
    }

    // Return whether o is in me.
    public boolean isMember(Object o) {
    }
    
    // Ensure that o is not in my list.
    // (Not called by the simulator.)
    public void delete(Object o) {
    }
    
    // Return the Object at the current location.
    // Precondition: The list must not be empty.
    public Object returnCurrentValue() {
    }
    
    // (Not called by the simulator.)
    public void removeCurrentValue() {
    }

    // Move current one spot forward in my list.  If the current is already
    // at the end of the list, wrap around to the front.
    // Precondition: The list must not be empty.
    public void advanceCurrent() {
    }
    
    // If current is at the end of my list, extend my list with a new element
    // containing o and advance current one step to that new spot.  Otherwise
    // move current one spot forward and ignore o.  
    // Return true iff we did extend my list.
    // Precondition: The list must not be empty.
    public boolean advanceNoWrap(Object o) {
    }
    
    // (Not called by the simulator.)
    public void retractCurrent() {
    }
    
    // If current is at the beginning of my list, extend my list at the front
    // with a new element containing o and move current one step backward to 
    // that new spot.  Otherwise move current one spot backward and ignore o.  
    // Return true iff we did extend my list.
    // Precondition: The list must not be empty.
    public boolean retractNoWrap(Object o) {
    }
    
    // Prints the contents of my list.
    // For debugging only.  Only works if a ListWithCurrent of simple base 
    // types.  Works by Advancing current all the way around and back to where 
    // it started.
    public void print() {
    }
}
