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 tedhe = 2.0; double es = 5.0; int psiant = 6; double eaden = 2.0; int gruri = 4;
...draw the AST and evaluation results for the following expression:
tedhe * es * 3 - 0 + 6 + psiant + eaden - gruri
Things to double-check in your solution:
Given the following variables:
boolean ca = false; double eing = 5.0; int sois = 4; double oodspe = 4.0; double mihud = 2.0; int prith = 6; boolean ocot = true;
...draw the AST and evaluation results for the following expression:
ca || eing > sois || 6 <= 6 == (oodspe != mihud) == prith > 8 && ocot || 7 >= 1
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: