📄 slistnode.jshl
字号:
//--------------------------------------------------------------------
//
// Laboratory 7 SListNode.jshl
//
// Class definition 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 SListNode
{
// Data members
private Object element; // List element
private SListNode next; // Reference to the next element
// Constructor
SListNode ( Object elem, SListNode nextPtr )
// Creates a list node containing element elem and next pointer
// nextPtr.
{
}
// Class Methods used by client class
SListNode getNext( ) // Return reference to next element
{
}
SListNode setNext( SListNode nextVal ) // Set reference to next element
{ // & return that reference
}
Object getElement( ) // Return the element in the current node
{
}
void setElement(Object newElem) // Set current element to newElem
{
}
} // class SListNode
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -