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 trudid = 5.0; double esho = 4.0; double menple = 4.0; int en = 9;
...draw the AST and evaluation results for the following expression:
5 * 5 * trudid - esho + 2 * menple + en - 6
Things to double-check in your solution:
Given the following variables:
boolean qunbar = false; int se = 2; double etging = 1.0; int alcard = 9; int sceo = 5; int trul = 8; double hica = 1.0;
...draw the AST and evaluation results for the following expression:
(qunbar || se != etging != alcard >= 5) != (sceo != 5) && 3 < 7 == !(4 > trul) != 7 < hica
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"
Things to double-check in your solution:
Related puzzles: