/** * This program simulates a simple mathematica type program. It does this by *taking the user input, and changing it into a postfix order that can then *be evaluated correctly by the computer.This produces results that came * from the proper order of operations, regardless of how the data was entered, *meaning it doesn't matter if all multiplication or division comes first. *Written by Jessica Smith */ #include // for cout #include #include #include #include "node.h" #include "globals.h" #include "Calculator.h" #include "VariableMap.h" #include "OperatorMap.h" #include "binaryNode.h" #include "unaryNode.h" #include "bFuncNode.h" #include "differentiatorNodes.h" #include "arithmetica.h" #include "ProcessString.h" #include "ProcessDerivative.h" int main () { /** *This creates a NodeCreator which will be responsible for changing the *input into nodes. */ VariableMap varMap; string tester ="d(2+2x,x)"; int k=0; ProcessString * test1=new ProcessDerivative(tester,k,varMap); test1->processBeginning(); test1->processRest(); Arithmetica * arithType = new Differentiator(); Calculator calc(arithType); calc.performCalculations(); return 0; }