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 draes = 4.0; double cas = 2.0; int smoi = 9; int cinan = 7; double plusbla = 5.0;
...draw the AST and evaluation results for the following expression:
4 + draes * 7 + cas / 9 * smoi + cinan - 9 % 3 % 3 - plusbla + 1
Things to double-check in your solution:
Given the following variables:
int casiss = 6; double leem = 4.0; boolean jum = false; boolean hacle = false; double tretac = 4.0; boolean whohan = false; boolean fladbein = true; boolean po = true; boolean ma = false; boolean prulpi = false; double foehus = 2.0;
...draw the AST and evaluation results for the following expression:
casiss == leem || (jum || hacle && 1 <= tretac == whohan == fladbein) && po == ma != 5 > 6 != prulpi == 5 >= foehus
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: