For each of the Java expressions below:
Be sure that your tree accurately reflects how Java would evaluate the expression.
Given the following variables:
int ni = 9; double na = 4.0; int ke = 1; double inu = 1.0; double vuw = 1.0; double farua = 5.0; int besas = 1;
...draw the AST and evaluation results for the following expression:
2 * 4 - ni / 8 % na + ke % inu % vuw - farua / 5 * besas
Things to double-check in your solution:
Given the following variables:
int phelos = 1; int ursot = 9; int vor = 4; double ronho = 4.0; double suntown = 2.0; int cirdcol = 2; int co = 1; boolean iec = false; boolean ve = true;
...draw the AST and evaluation results for the following expression:
6 > phelos || 2 < 8 && (9 >= 3 || 7 != ursot && vor > 2 || 6 >= ronho && 6 >= suntown == cirdcol <= co) && iec || ve
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: