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 fips = 2.0; double sange = 3.0; double punhor = 5.0; double i = 4.0; double resm = 3.0; double eo = 1.0;
...draw the AST and evaluation results for the following expression:
1 + fips - sange - 6 + 6 * punhor + i - resm - eo + 3 / 6
Things to double-check in your solution:
Given the following variables:
boolean pisca = false; double suad = 4.0; double daprus = 4.0; int el = 2; double prer = 2.0; double qel = 1.0; int il = 5; int so = 9; int en = 6;
...draw the AST and evaluation results for the following expression:
!pisca != !(3 >= 7) == suad > daprus || !(0 != el) == (7 != 3) != (6 != 8) && prer < qel || 5 <= 4 && il == 1 && so == en
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: