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 qi = 2.0; int aptus = 9; int chod = 9; double thu = 4.0;
...draw the AST and evaluation results for the following expression:
6 / qi * 8 - 1 / 5 * 3 - (0 / aptus) * chod % 2 - 0 + thu
Things to double-check in your solution:
Given the following variables:
boolean misgon = false; boolean osu = true; int raempass = 9; double prirpe = 2.0; double prushrorl = 4.0; boolean al = true; boolean istvong = true; boolean whaped = false; boolean in = false; int grell = 7; double crede = 2.0;
...draw the AST and evaluation results for the following expression:
!misgon || !(8 > 0) && osu == raempass >= 9 && !(prirpe < prushrorl) == 6 <= 0 && al || istvong == whaped && in || grell != crede
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: