⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slist.jshl

📁 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验 试验
💻 JSHL
字号:
//--------------------------------------------------------------------
//
//  Laboratory 7                                         SList.jshl
//
//  Class definitions for the singly linked list implementation of 
//  the List ADT
//
//  The student is to complete all missing or incomplete method 
//     implementations for each class (Slist and SListNode)
//
//--------------------------------------------------------------------

class SList implements List
{
    // Data members
    private SListNode head,     // Reference to the beginning of the list
        cursor; // Reference to current cursor position
    
    // Constructors & Helper Method
    SList (  )                  // Default constructor: Creates an empty list
    {

    }

    SList ( int size )
        // Creates an empty list. The argument is included for compatibility
        // with the array implementation; size is ignored.
    {

    }

    // Class Methods    
    private void setup( )   // Called by constructors only: Creates an empty list
    {

    }


    // ----- Insert method definitions for the interface List here ------ //


    //--------------------------------------------------------------------
    //
    //                        In-lab operations
    //
    //--------------------------------------------------------------------

    void moveToBeginning ( )                    // Move to beginning
    {

    }

    void insertBefore ( Object newElement )     // Insert before cursor
    {

    }
    
} // class SList

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -