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 ca = 3.0; double ejo = 1.0; double tiac = 5.0; double prodon = 4.0; int qos = 3; int cac = 3;
...draw the AST and evaluation results for the following expression:
ca * ejo * 9 - tiac * prodon - qos * 4 - cac
Things to double-check in your solution:
Given the following variables:
int stalm = 4; int weha = 1; double cea = 3.0; int vomin = 3; int io = 6; boolean miariath = true;
...draw the AST and evaluation results for the following expression:
2 <= 4 && 5 >= 1 && !(stalm >= 4) || (weha < cea != !(vomin > 0) == 4 < io) == miariath
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: