1
edit
Changes
→Part 1: Integer Linked List
== Part 1: Integer Linked List ==
=== Class: IntListNode, Files: [intlist.h, intlist.cpp], Test: 0 ===
==== Protected Functions ====
; void next(IntListNode*): Next setterSetter for this node's next member. Sets the internally held next Accepts a pointer to the incoming pointera node. Does not return anything.
==== Public Functions ====
; IntListNode(int v = int(), IntListNodeConstructor: Accepts two arguments::* n = NULL): ConstructorInteger to initialize node's value. Note the Defaults to a default valuesconstructed int. Initializes the internally held value :* Pointer to v and the next pointer node in list. Defaults to nNULL.; IntListNode(const IntListNode& src)Copy Constructor: Copy constructor. Should initialize Initializes internal value as a copy of the internally held value to srcsource's internally held internal value. Should initialize ''Sets this object's next''' to '''NULL'''.; IntListNode& operator=(const IntListNode& src)Standard Assignment Operator: Assignment operator. Should set the internally held Assigns source's internal value to srcthe current object's internally held internal value. Should set ''Sets this object's next''' to '''NULL'''. Should do '''NOTHING''' Does not alter the object in the case of '''self-assignment''' (ie IntListNode x; x = x;). Returns a reference to the current object.; ~IntListNode(): Destructor. As this node does not allocate any memory, this function can remain empty.
; int val() const: Val getter. Const function. Does not accept parameters. Returns the internal value internally held.; void val(int): Val setter. Receives an int. Sets the internally held internal value to the incoming valuereceived int. Does not return anything.
; IntListNode* next() const: Next getter. Const function. Does not accept parameters. Returns pointer to the internally held next pointernode.
=== Class: IntList, Files [intlist.h, intlist.cpp], Test: 0 ===