Content Frame
Note for screen reader users: There is text between the form elements on this page. To be sure that you do not miss any text, use item by item navigation methods, rather than tabbing from form element to form element.
Skip Breadcrumb Navigation
Home  arrow Student Resources  arrow Chapter Quizzes  arrow Chapter 18

Chapter 18

Applets

This activity contains 15 questions.

Question 1.

A URL (Uniform Resource Locator):
  1. is a web address - it specifies where information can be found on the Web
  2. always begins with http://
  3. usually begins with a specification of what "protocol" is to be used to access the referenced information - like ftp, http, etc.
  4. may refer to a file on your computer just as easily as a file somewhere on the Web

Open Hint for Question 1 in a new window.
 
End of Question 1


Question 2.
Consider the following code fragment found within an applet:
JLabel jLabel = new JLabel( );
ImageIcon imageIcon = new ImageIcon("image.txt");
jLabel.setIcon(imageIcon);


Open Hint for Question 2 in a new window.
 
End of Question 2


Question 3.
How does the content pane within a JApplet differ from that found within a JFrame?


Open Hint for Question 3 in a new window.
 
End of Question 3


Question 4.
HTML is:
  1. a language for creating documents that will be displayed using a web browser
  2. used to create web pages, most of which do not utilize applets
  3. a specialized part of the Java language
  4. a programming language with much the same power as Java or C++


Open Hint for Question 4 in a new window.
 
End of Question 4


Question 5.

If your computer has several JVM's (Java Virtual Machines) installed, which of the following is (are) true?
  1. Only the most recent JVM will be used for running an applet that is specified in a page viewed by your browser when it's looking at a web page on the Word Wide Web
  2. Your browser will use the JVM that came with your Java development environment to view such pages
  3. Your browser will use it's own JVM to view such pages
  4. You can specify which JVM is to be used to view such pages

Open Hint for Question 5 in a new window.
 
End of Question 5


Question 6.

In HTML a link (or hyperlink):
  1. provides a way to link to a document on your own computer
  2. provides a way to link to a document on a computer on the World Wide Web
  3. provides a way to link to several documents within a single link
  4. usually will be highlighted by a browser that is displaying it

Open Hint for Question 6 in a new window.
 
End of Question 6


Question 7.
What restrictions are imposed on img= tags that are different from those imposed on href= tags?


Open Hint for Question 7 in a new window.
 
End of Question 7


Question 8.

What statement(s) is (are) true about HTML comments?
  1. An HTML comment must begin with /* and end with */, just like Java
  2. An HTML comment may begin with //, and extend to the end-of-line, just like Java
  3. An HTML comment may be "nested" - i.e., it may contain another comment within itself
  4. An HTML comment ends with />, just like end paragraph, end HTML, end BODY, etc.

Open Hint for Question 8 in a new window.
 
End of Question 8


Question 9.

Which of the following is (are) true?
  1. HTML is a case-sensitive language
  2. HTML is a whitespace insensitive language
  3. HTML commands all are "delimited" - they have a start command and a corresponding end command (denoted by </ command>)
  4. HTML files should be named using a .htm or .html suffix

Open Hint for Question 9 in a new window.
 
End of Question 9


Question 10.

Which of the following statement(s) are true about convering a Swing application into a JApplet:
  1. The main method should be removed; the constructor(s) should be replaced by a parameterless init method with much the same contents
  2. You must remove all calls to super, setDefaultCloseOperation, and setTitle
  3. You should delete all calls to setSize
  4. You should replace extends JFrame with extends JApplet

Open Hint for Question 10 in a new window.
 
End of Question 10


Question 11.

Which statement(s) is (are) true about Applets and JApplets?
  1. They normally require HTML to launch them
  2. They have their size controlled by HTML, rather than via a setSize method call
  3. They usually require a setDefaultCloseOperation method call
  4. They can be run just using the AppletViewer program to launch them

Open Hint for Question 11 in a new window.
 
End of Question 11


Question 12.

Which statement(s) is (are) true about applets?
  1. Applets are designed so that they cannot (or cannot easily) run applications on your computer
  2. Applets cannot read files from your computer's hard drive
  3. Applets cannot write files to your computer's hard drive
  4. Applets cannot (or cannot easily) corrupt your computer's operating system

Open Hint for Question 12 in a new window.
 
End of Question 12


Question 13.

Which statement(s) is (are) true about menus in JApplets?
  1. The methods used for adding menus to JApplets are the same as those for adding menus to JFrames
  2. The methods used for adding sub-menus to JApplets differ slightly from those for adding sub-menus to JFrames
  3. The setJMenuBar method functions the same way in both JApplets and JFrames
  4. You must add menus to the content pane or to a panel that is part of the JApplet if you wish to make use of menus

Open Hint for Question 13 in a new window.
 
End of Question 13


Question 14.

Which statement(s) is (are) true?
  1. A web page that is missing its initial HTML or its final /HTML tag will not display correctly
  2. A web page that has no TITLE tag will not be able to be "bookmarked"
  3. The ADDRESS portion of a web page does not display
  4. Text specified with H2 always is larger than text specified with H1

Open Hint for Question 14 in a new window.
 
End of Question 14


Question 15.

Which statement(s) is (are) true?
  1. HTML must include an applet tag if it is to run an applet
  2. An applet tag must have at least code=, height=, width= in order to be correct
  3. There may be only a single applet tag in an HTML page
  4. An applet tag only needs to have code= in order to specify which applet is to be run - the height=, width= are optional

Open Hint for Question 15 in a new window.
 
End of Question 15





Pearson Copyright © 1995 - 2010 Pearson Education . All rights reserved. Pearson Addison Wesley is an imprint of Pearson .
Legal Notice | Privacy Policy | Permissions

Return to the Top of this Page