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 oshio = 1.0; int cus = 7; int rosi = 2; double fasm = 2.0; int ma = 6; double sonrup = 5.0; double fiassprad = 1.0;
...draw the AST and evaluation results for the following expression:
oshio * cus % rosi % 8 - 3 / 5 - 2 * fasm / ma - sonrup / fiassprad
Things to double-check in your solution:
Given the following variables:
double coilsac = 3.0; boolean lae = false; double u = 2.0; boolean anang = false; boolean ke = false; double nensed = 1.0; double prultung = 4.0; double bepass = 1.0;
...draw the AST and evaluation results for the following expression:
!(1 > coilsac) != lae || 1 != u != anang != ke == 5 >= nensed && 1 > 9 && 7 < 1 == 4 < prultung && 7 <= bepass
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: