#include "Node.h" #include using namespace std; template Node::Node() { // poorly defined how to set data in this case next = NULL; } template Node::Node(const Type & dataArg) { data = dataArg; next = NULL; } template Node::Node(const Type & dataArg, Node* nextArg) { data = dataArg; next = nextArg; } template Node::Node(const Node & nodeToCopy) { data = nodeToCopy.data; next = nodeToCopy.next; } template Node::~Node() { // nothing to be defined here } template Node& Node::operator=(const Node & nodeToCopy) { if (this != &nodeToCopy) { // no cleanup required // do copy data = nodeToCopy.data; next = nodeToCopy.next; } return *this; } template ostream& operator<<(ostream & out, const Node &nodeToPrint) { out << "[" << nodeToPrint.data << "," << nodeToPrint.next << "]"; return out; }