#include #include #include "node.h" #include "globals.h" #include #include "differentiatorNodes.h" /* *Written by Jessica Smith from code adapted from code written by rcd. */ Key::Key (string key) : myKey(key), myPrecedence(KEY_PRECEDENCE), myValue(0) { } Key:: ~Key (){} // return the number double Key:: evaluate () const { return (myValue); } // print the number string Key::description()const { return(myKey); } void Key::print (ostream & out) const { out << myKey; } // copy this node Node * Key::copy () const { return new Key(myKey); } int Key:: precedence()const { return myPrecedence; }