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 o = 7; int udmong = 2; double ble = 5.0; double teoc = 5.0; double oerl = 1.0; int e = 1; double ozar = 5.0; double lanpee = 2.0; double irdden = 2.0;
...draw the AST and evaluation results for the following expression:
o + udmong + ble - teoc + oerl - e + 5 * ozar / lanpee - 6 / 2 % irdden
Things to double-check in your solution:
Given the following variables:
boolean spewpru = true; boolean casvaent = true; double erdos = 3.0; int prassdir = 7; int er = 5; int vinchuss = 6; int rono = 7; boolean tholas = true; int onchi = 7; int asphaeck = 3; boolean teup = true; boolean swe = false;
...draw the AST and evaluation results for the following expression:
spewpru == casvaent || erdos != prassdir && er >= 8 || vinchuss != 5 != 7 >= rono || 0 <= 1 == tholas != onchi <= asphaeck || teup == swe
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: