All Test Cases assume there is a calculator object named c. Students should add print checks for each variable to see that the operations are performed correctly.

TEST CASE 1:

c.assign("x=5");
c.assign("x=x2*");
c.assign("a=x4*8+")
c.assign("y=a4/");
c.assign("b=xy*6/x/");
int n = c.evaluate("abx*y+-ay//");
int m = c.evaluate("y");

//x = 10
//a = 48
//y = 12
//b = 2
//and n = 4, m = 12

TEST CASE 2:

c.assign("a=3");
c.assign("a=83+3*");
c.assign("b=a3*a-a-a-");
c.assign("c=a83+/");
c.assign("e=987654321+-+--+-+");
c.assign("d = 86+1+");
int f = c.evaluate("dce*-");
int g = c.evaluate("5");

//Here a=33, b=0, c=3, e = 5, d=15, and f=0, g=5

TEST CASE 3:

c.assign("a=13+");
c.assign("a=3");
c.assign("a=aa*);
c.assign("b=a");
c.assign("e=3ab+*);
c.assign("d = e6/");
c.assign("b=5");
int x = c.evaluate("56+7-65-123+-++")
c.assign("x=5");
int y = c.evaluate("xb+d-")

//Here a = 4 then a=3, then a=9, b=9, e=54, d=9,b=5, the int x=1, the variable x=5, the int y=1