//--------------------------------------------------------------------
//
//  Laboratory 3                                          show3.cpp
//
//  Array implementation of the showStructure operation for the
//  List ADT
//
//--------------------------------------------------------------------

void List:: showStructure () const

// Outputs the data items in a list. If the list is empty, outputs
// "Empty list". This operation is intended for testing/debugging
// purposes only.

{
    int j;   // Loop counter

    if ( size == 0 )
       cout << "Empty list" << endl;
    else
    {
       cout << "size = " << size
            <<  "   cursor = " << cursor << endl;
       for ( j = 0 ; j < maxSize ; j++ )
           cout << j << "\t";
       cout << endl;
       for ( j = 0 ; j < size ; j++ )
           cout << dataItems[j] << "\t";
       cout << endl;
    }
}


