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 fahor = 4.0; int cissbi = 7; int ni = 6; int nicas = 6; double ir = 3.0;
...draw the AST and evaluation results for the following expression:
fahor * cissbi / ni / 2 - (nicas / ir - 0 - 7 * 0 - 1 + 1)
Things to double-check in your solution:
Given the following variables:
double oaoct = 1.0; boolean hachlu = false; int salstal = 6; int hecreash = 8; double parfrusm = 2.0; int te = 9; boolean zora = false; double vodhi = 1.0; int proent = 9; int hetrox = 4; int be = 6; boolean dalgir = true;
...draw the AST and evaluation results for the following expression:
oaoct >= 1 != hachlu != (salstal <= 9 && hecreash == parfrusm) || !(te < 8) && zora || 0 < vodhi && proent > hetrox || !(be > 5) || dalgir
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: