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 ecral = 2.0; int neis = 1; int ne = 8; double degplai = 3.0; double cleabaus = 3.0; int poushe = 7; double endo = 3.0;
...draw the AST and evaluation results for the following expression:
1 % ecral / neis + 3 * ne - 2 + degplai * cleabaus - 5 - poushe / endo
Things to double-check in your solution:
Given the following variables:
double spinpod = 3.0; double houdmas = 1.0; int hecras = 4; int cemeng = 1; boolean rosmdron = false; double munnirds = 3.0; boolean essrof = false;
...draw the AST and evaluation results for the following expression:
spinpod <= 0 && houdmas != hecras && 0 <= 2 == !(4 < cemeng) && 3 >= 3 && (rosmdron != 9 <= 6) || 7 == munnirds && 7 <= 3 != essrof
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: