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 pirget = 4.0; double stomeounks = 4.0; int pri = 8; int cec = 1; double in = 2.0;
...draw the AST and evaluation results for the following expression:
(pirget / 6 - 6 % 3 * 7 + stomeounks - 3 / pri + cec / in / 3 * 6)
Things to double-check in your solution:
Given the following variables:
double thui = 3.0; double cim = 3.0; double siath = 3.0; int ehass = 5; int o = 6; int ent = 8; double pilfar = 4.0; boolean wobon = true; double ounfia = 4.0; double ro = 3.0;
...draw the AST and evaluation results for the following expression:
2 > thui == (!(7 != cim)) && siath < ehass != 7 <= o || ent > pilfar != !wobon != (7 == 3) == 3 < 9 == ounfia >= 1 != (!(0 == 1)) || 9 < ro
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 + 12
Things to double-check in your solution:
Related puzzles: