| NAME: Midterm Exam | COS 126 Solutions, Spring 2012 | 
| Type | Value | 
|---|---|
| String | "10099" | 
| int | 3 | 
| String | "199A" | 
| boolean | false | 
| double | 1.0 | 
| double | 1.5 | 
| boolean | false | 
| Decimal | Binary in Memory | Hex on display | 
|---|---|---|
| 7 | 0000 0000 0000 0111 | 0007 | 
| -7 | 1111 1111 1111 1001 | FFF9 | 
| 162 | 0000 0000 1010 0010 | 00A2 | 
| -275 | 1111 1110 1110 1101 | FEED | 
2 0 0
5 0 0
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 
|---|---|---|---|---|---|---|---|---|---|
| 1 | |||||||||
| 1 | 1 | ||||||||
| 1 | 1 | 1 | |||||||
| 1 | 1 | 1 | 1 | ||||||
| 1 | 1 | 1 | 1 | 1 | |||||
| 1 | 1 | 2 | 1 | 1 | |||||
| 1 | 1 | 3 | 1 | 1 | 
0 1 2 2 2 3 9
a blank line
6 double x = StdIn.readDouble();
3 int N = Integer.parseInt(args[0]);
5 for (int i = 0; i < N; i++) {
R[6] <-- 01 R[4] <-- R[4] - R[6]
draw( x - s, y - s, s/2.2, level-1, k ); // bottom left draw( x + s, y - s, s/2.2, level-1, k ); // bottom right