For each of the Java expressions below:
Be sure that your tree accurately reflects how Java would evaluate the expression.
Given the following variables:
double zenson = 4.0; int todcho = 1; double rallplo = 1.0; int mipri = 6; int ouss = 4;
...draw the AST and evaluation results for the following expression:
7 % zenson + 3 % todcho / 7 / (rallplo + 6 * mipri + 4 + ouss) / 7
Things to double-check in your solution:
Given the following variables:
double pa = 4.0; double fu = 3.0; double awec = 1.0; double ne = 5.0; int resmu = 6; int rorben = 4; int ranxpred = 7; int fick = 2; boolean sa = true; int stasphint = 6; double zardma = 4.0; int ou = 6;
...draw the AST and evaluation results for the following expression:
pa >= 7 || (9 <= 7 != 0 <= fu != !(awec > 9) && ne <= resmu == rorben > ranxpred == fick < 9 || sa) != 2 <= stasphint != (zardma != ou)
Things to double-check in your solution:
Draw the AST and evaluation results for the following expression:
0 + 1 + 2 + 3 + 4 + 5 + 6 + "7" + "8" + 9 + 10 + "11"
Things to double-check in your solution:
Related puzzles: