Node class

The node class deals with the fundamental unit of manipulation in our program, the venerable Node.

Node() constructor

Node *mynode = new Node;
Function Parameter(s) Return value
Node() none pointer to the newly allocated node

Node() is the parameterless constructor that is responsible for creating a new instance of a node.

Node(int) constructor

Overloaded constructor that will accept an initial integer value to be assigned to the newly allocated Node's value member.

Node *mynode = new Node(4);
Function Parameter(s) Return value
Node(int) integer value to assign as Node's initial value pointer to the newly allocated node

copy()

copy() will duplicate the node's contents, except NULL next and prev

Function Parameter(s) Return value
Node *copy() no parameters pointer to copied node

getvalue()

getvalue() will return the value of the current node

Function Parameter(s) Return value
int getvalue() no parameters return value in node

setvalue()

setvalue() will set the value of the current node

Function Parameter(s) Return value
bool setvalue(int) integer value to set value of current node boolean value of success vs failure

delete()

delete() will delete the node

Function Parameter(s) Return value
~Node *delete() no parameters no return