1. Why does an applet have no main() method?

a. The browser acts as the main. The applet provides methods for the browser.
b. The paint() method is like the main method for an applet.
c. Programs that do graphics don't need a main.
d. Only simple programs need a main.

2. What class must be extended when you code an applet?

a. AWT
b. JDK
c. Applet
d. Graphics

3. What is the role of the Graphics object?

a. It represents the area the applet can draw in and provides drawing methods.
b. It can be omitted, but is sometimes used for file i/o.
c. It represents the entire screen of the computer monitor.
d. It contains a list of commands from the browser to your applet.

4. The width and height of the drawing area correspond to coordinates:

a. X and Y, with (0,0) in the lower left corner
b. X and Y, with (0,0) in the upper left corner
c. Y and X, with (0,0) in the lower left corner
d. Y and X, with (0,0) in the lower right corner

5. What is a location in a digital image called?

a. pipin
b. pickerel
c. pixel
d. pickel

6. Which of the following puts "Hello" starting at X=20 Y=50? Assume that graph holds a Graphics object reference.

a. drawString( "Hello", 20, 50 );
b. graph.drawString( 20, 50, "Hello" );
c. graph.println( "Hello" );
d. graph.drawString( "Hello", 20, 50 );

7. What set of tags is embedded in a text file to tell the browser how to treat each section of text?

a. HTTP
b. TCP
c. HTML
d. VRML

8. Which of the following is a correct web page for the applet MyApplet?

a.
<html>
<body>
<applet code="MyApplet.class">
</applet>
</body>
</html>
b.
<html>
<body>
<applet code="MyApplet.class"  width="250" height="200">
</body>
</html>
c.
<html>
<applet code="MyApplet.class"  width="250" height="200">
</applet>
</html>
d.
<html>
<body>
<applet code="MyApplet.class"  width="250" height="200">
</applet>
</body>
</html>

9. Which of the following draws a circle with a radius of 50 at X=10, Y=20?

a. graph.drawCircle( 50 );
b. graph.drawOval( 50, 50 );
c. graph.drawOval( 10, 20, 50, 50 );
d. graph.drawCircle( 50, 50, 10, 20 );

10. Which of the following sets the background color of the applet to white?

a. setColor( white );
b. setColor( Color.white );
c. setBackGround( Color.white );
d. setBackground( white );