CS 1401, Quiz 2, TR class section

Date: Tuesday, September 9, 2014
Name (please type legibly, ideally in block letters): ______________________________________________________________________

1. Mark what is covered (Y) and what is not covered (N) in the part of the book that you were supposed to read for this week:

2. What will be the value of the variable a after performing the following Java statement:

int a = 7 / 2 / 2 + 7 % 4;
Explain step by step how this value will be computed

3. What will be printed as a result of the following piece of code? explain step-by-step:

double a = 2;
double b = a + 0.5;
a = b − 0.5;
System.out.println(x);
System.out.println(y);