// Created by Frank M. Carrano and Tim Henry. // Copyright (c) 2013 __Pearson Education__. All rights reserved. /** @file Node.cpp Listing 4-2 */ #include "Node.h" #include template Node::Node() : next(nullptr) { } // end default constructor template Node::Node(const ItemType& anItem) : item(anItem), next(nullptr) { } // end constructor template Node::Node(const ItemType& anItem, Node* nextNodePtr) : item(anItem), next(nextNodePtr) { } // end constructor template void Node::setItem(const ItemType& anItem) { item = anItem; } // end setItem template void Node::setNext(Node* nextNodePtr) { next = nextNodePtr; } // end setNext template ItemType Node::getItem() const { return item; } // end getItem template Node* Node::getNext() const { return next; } // end getNext