] > midterm exam

exit midterm exam

NAME¯

 
CSE 214: Mid Term Exam
 
Tu, Nov 4, 3:30—4:48
Open Notes, Open Books
The exam consists of seven¯ problems
Answers not appearing in designated spaces WILL NOT be graded

Problem #1 (10 points)
Fill the missing numbers in the following table




DecimalBinaryOctalHexadecimal




17




10101




11




A3




Problem #2 (10 points)
Show the output of the following println instruction.
System.out.println(  
   "\u0047\u006F\u006F\u0064\u0020\114\165\143\153"  
);

ASCII octal codes:










01234567









4 sp ! " # $ % &









5()*+,-./









601234567









7 8 9 : ; < = > ?









10@ABCDEFG









11 H I J K L M N O


















01234567









12 P Q R S T U V W









13XYZ[\]^_









14abcdefg









15hijklmno









16pqrstuvw









17xyz{|}~ 









ASCII hexadecimal codes:


















0123456789ABCDEF

















2 sp ! " # $ % & ( ) * + , - . /

















30123456789:;<=>?

















4@ABCDEFGHIJKLMNO

















5 P Q R S T U V W X Y Z [ \ ] ^ _

















6abcdefghijklmno

















7pqrstuvwxyz{|}~ 

















Problem #3 (10 points)
Show the output of the following code fragment.
Problem #4 (10 points)
the output of the following code fragment.
Problem #5 (10 points)
Show the output of the following code fragment.
Problem #6 (10 points)
Consider the following Exam class.



Field Summary



static intone holds the digit 1



int two holds the digit 2



Constructor Summary



Exam()



Method Summary



static intgetThree()produces the digit 3



int getFour() produces the digit 4



The incomplete program

produces the following output.

1  
2  
3  
4

Add the missing code fragments to the given program. (It is not allowed to remove code from the program.)

Problem #7 (10 points)
Consider the following program.

The program uses a class named Hidden. Show the details of the fields, constructors, and methods of the Hidden class that are used in the program.



Field Summary


   


   


Constructor Summary


 


 


Method Summary