Name___________________________________ Lab Section you attend______________
CSE131 Quiz 1
Data Types and Expressions
5 Sept 2008
- An expression tree is shown below.
- Below, write the Java expression for the tree, using parentheses only
- When the expression is evaluated, what is the resulting value?
- What is the type of the resulting value?
- For each row in the table below, place an X in the
int or double
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 || || |