For each of the Java expressions below:
Be sure that your tree accurately reflects how Java would evaluate the expression.
Given the following variables:
int guangect = 7; double mi = 1.0; int arseon = 9; double ed = 3.0; int gointo = 2; double goungkoc = 4.0; double o = 4.0;
...draw the AST and evaluation results for the following expression:
guangect / mi - 0 - arseon - 2 % ed + gointo + 1 * 5 - 9 + goungkoc % o
Things to double-check in your solution:
Given the following variables:
double orchjan = 4.0; int erspla = 7; boolean pou = true; boolean ledstar = true; double splues = 4.0; boolean cri = true; double ploro = 2.0; boolean odiog = false; double cin = 1.0; int iowthmen = 7; double lossax = 5.0;
...draw the AST and evaluation results for the following expression:
orchjan < erspla && pou || 7 < 2 != (!!ledstar && 9 != splues == cri && !(9 >= 3) && 2 <= ploro) != odiog || !(2 > cin) || iowthmen >= lossax
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: