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 essro = 4; double vi = 4.0; int fric = 2; double o = 1.0; int ed = 6; int ou = 5; int ebdo = 2;
...draw the AST and evaluation results for the following expression:
9 % essro * vi * fric % 9 % o * 2 % ed / ou % ebdo * 1
Things to double-check in your solution:
Given the following variables:
int na = 2; int a = 9; int se = 7; double hoth = 1.0; boolean secscon = false; boolean bapeing = true; int reo = 2; boolean phor = false; double madgish = 2.0; double prulppruss = 3.0;
...draw the AST and evaluation results for the following expression:
na >= a || se != hoth && secscon || !bapeing != 0 < reo || 9 < 6 || phor && 7 >= 5 != madgish >= 3 == (4 == prulppruss)
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: