CS 1401, Quiz #5

Date: Tuesday, February 19, 2008
Name: ____________________________________________________________
Class section TR 9:00 am

1. For each of the following topics, write "yes" or "no" depending on whether this topic is covered in Chapter 5, the chapter that you were supposed to read before the class:

subclasses

for loops

static variables

while loops

2. Draw truth tables for "and" and "or" and use these truth tables to find the truth value of the statement ((8 < 7) || (5 + 1 == 6)) && (12 > 11).

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

3. Write down a statement that, given three real numbers b, x, and d, assigns to a Boolean variable between:

         the value true if x is strictly between b and d (i.e., if b < x < d) and

         the value false otherwise.