CS 1401, Quiz #10

Date: Tuesday, April 18, 2006
Class section (9 am or 10:30 am): ____________________________
Name (please type legibly, ideally in block letters): ______________________________________________________________________

1. Use the ? construction to assign to the Boolean variable warm the value "true" is temperature is above 80 and "false" if temperature is 80 or below.





2. What is printed by the following code fragment? Trace your results, do not just guess.
for (day = 15, temperature = 80; day <= 19; day++, temperature +=5)
  System.out.println(day + " " + temperature);