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 bie = 2.0; double cinsel = 1.0; int leha = 9; double iur = 4.0;
...draw the AST and evaluation results for the following expression:
1 + 7 + 0 - bie - cinsel * leha - 9 + 2 / iur / 5 - 0
Things to double-check in your solution:
Given the following variables:
boolean wacbro = false; boolean mirdcer = true; int cith = 9; double angat = 5.0; double pha = 4.0; boolean cidvioc = true; double prescon = 1.0; boolean mo = false;
...draw the AST and evaluation results for the following expression:
wacbro && !mirdcer != 9 >= 5 == (cith != 2) || !(angat > pha) == cidvioc != prescon <= 5 && !(7 > 1) == 0 < 8 && !mo
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: