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 ciosfoft = 1.0; double en = 2.0; int lanspa = 9; double psosh = 1.0; double shis = 2.0;
...draw the AST and evaluation results for the following expression:
ciosfoft % en * lanspa * 9 / psosh % 4 / 7 + shis
Things to double-check in your solution:
Given the following variables:
double pacvec = 3.0; double ia = 2.0; double puounid = 4.0; double cuila = 4.0; double micou = 3.0; double pased = 2.0; double wroil = 4.0; double id = 4.0; int ucor = 7;
...draw the AST and evaluation results for the following expression:
8 > pacvec == ia >= puounid == 4 >= cuila && 4 < micou && pased == 3 == wroil >= 5 && id < ucor
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: