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 nir = 5.0; double natser = 1.0; int hotsal = 4; double drera = 2.0; int poumo = 3; double hesa = 2.0; int chaonproc = 8;
...draw the AST and evaluation results for the following expression:
nir * 1 - natser * 5 % hotsal * drera + poumo % hesa * (3 / chaonproc - 9)
Things to double-check in your solution:
Given the following variables:
int mulslel = 3; boolean spesil = true; boolean ciac = true; int tesri = 5; double i = 5.0; double ildod = 2.0; double hu = 2.0; double pi = 4.0; boolean seca = true; boolean alna = false; int prosdi = 9; boolean blopen = true;
...draw the AST and evaluation results for the following expression:
3 <= mulslel && spesil == ciac != tesri < i || !(ildod < hu) && pi != 6 || seca || alna == (!(prosdi == 2)) != !blopen
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: