Name___________________________________   Lab Section you attend______________

CSE131 Quiz 1
Data Types and Expressions
5 Sept 2008

  1. An expression tree is shown below.
    1. Below, write the Java expression for the tree, using parentheses only where necessary.
    2. When the expression is evaluated, what is the resulting value?
    3. What is the type of the resulting value?
  2. For each row in the table below, place an X in the int or double column that is the more appropriate type to represent the specified value.
    Value int? double?
    Area of a circle    
    Number of robots you own    
    Your graduation year    
    Your height in meters    
    Your weight in micrograms    
    Number of facebook friends    
    Average age of your facebook friends