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 treem = 3.0; double ongun = 5.0; int uss = 5; double bi = 4.0; int se = 7; int jede = 7; int beremp = 1;
...draw the AST and evaluation results for the following expression:
treem + (ongun + 4 + uss / bi) + se / jede % 8 + beremp % 1
Things to double-check in your solution:
Given the following variables:
double iocwe = 2.0; int prerost = 1; double gophpria = 4.0; double molcon = 1.0; int prismtrae = 9; boolean mentil = true; boolean ni = true; double cec = 5.0; int usbe = 4; int er = 4;
...draw the AST and evaluation results for the following expression:
iocwe >= prerost == (0 == 6) || gophpria == 9 && 6 <= molcon == 0 > prismtrae == mentil != !!ni != (0 == cec) && usbe <= er
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
Things to double-check in your solution:
Related puzzles: