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 fepraw = 3.0; double ei = 3.0; int ortra = 5;
...draw the AST and evaluation results for the following expression:
fepraw - 1 * 7 - ei - ortra - 9 + 7 / 4 - 7
Things to double-check in your solution:
Given the following variables:
double so = 1.0; boolean iu = false; double lo = 3.0; boolean chath = false; double entiff = 4.0; int igren = 3; double ia = 5.0; int ci = 9; int sanwest = 4; double ul = 4.0;
...draw the AST and evaluation results for the following expression:
!(!(so == 1)) != (9 != 9) == (iu == (lo == 0) != chath != (entiff == igren) || ia >= ci) || !(sanwest >= ul)
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
Things to double-check in your solution:
Related puzzles: