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 ceed = 3.0; double sler = 3.0; double mecze = 4.0; double ni = 3.0; double pel = 4.0; int tiis = 7;
...draw the AST and evaluation results for the following expression:
9 % ceed / 7 + sler % mecze + 1 + 3 + ni % pel - tiis * 7
Things to double-check in your solution:
Given the following variables:
int wiossen = 3; int enbae = 3; double phlaf = 5.0; boolean na = false; boolean dunfor = false; int daor = 1; int dircost = 5; boolean alcoc = false; int ma = 3; int iendtant = 1; double poordgres = 5.0;
...draw the AST and evaluation results for the following expression:
5 >= wiossen && 2 == enbae == phlaf <= 8 || (na != dunfor && daor < 6 == dircost >= 2 && alcoc) != ma < iendtant || 6 > poordgres
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: