Sie sind auf Seite 1von 2

Java How to Program, 5/e Test Item File 1 of 2

Chapter 19

Section 19.1

19.1 Q1: Which of the following statements is false?


a.The "sizzle" of Java is multimedia.
b.Most programming languages do not have built-in multimedia capabilities.
c.True three-dimensional multimedia imaging is widely available today.
d.Most new computers are sold "multimedia ready" today.
ANS: c. True three-dimensional multimedia imaging is widely available today.

19.1 Q2: Which of the following would not be considered multimedia?


a.Video.
b.Databases.
c.Sound.
d.Images.
ANS: b. Databases.

Section 19.2

19.2 Q1: Class Image is a(n) __________ class.


a.IconImage.
b.Concrete.
c.Transparent.
d.abstract .
ANS: d. abstract.

19.2 Q2: Method __________ of class Applet returns the location of the HTML file on the Internet as an object of
class URL.
a.getDocumentBase.
b.getBaseDocument.
c.getDocumentLocation.
d.getDocumentURL.
ANS: a. getDocumentBase.

19.2 Q3: Which package is class Image in? Which package is class ImageIcon in?
a.javax.swing, javax.swing.
b.java.awt, javax.swing.
c.javax.swing, java.awt.
d.java.awt, java.awt.
ANS: b. java.awt, javax.swing.

19.2 Q4: Class Image objects are displayed using which Graphics method?
a.drawImage.
b.paintImage.
c.getImage.
d.setImage.
ANS: a. drawImage.

Section 19.3

19.3 Q1: An object of class __________ generates ActionEvents at a fixed interval in milliseconds and notifies
all of its registered ActionListeners that the event occurred.
a.Timer.
b.Clock.

© Copyright 2003 by Deitel & Associates, Inc. and Prentice Hall. All Rights Reserved.
Java How to Program, 5/e Test Item File 2 of 2

c.AlarmClock.
d.Interrupter.
ANS: a. Timer.

19.3 Q2: The first statement in any JComponent paintComponent method should be a call to the
a.Superclass's paint method.
b.Subclass’s paintComponent method.
c.Subclass’s paint method.
d.Superclass's paintComponent method.
ANS: d. Superclass's paintComponent method.

19.3 Q3: Stopping animation when the user switches Web pages helps to make the applet
a.robust.
b.safe.
c.browser friendly.
d.efficient.
ANS: c. browser friendly.

Section 19.4

19.4 Q1: An image map is an image that has __________ that the user can click to accomplish a task.
a.Buttons.
b.Toggles.
c.Hot areas.
d.Bubbles.
ANS: c. Hot areas.

Section 19.5

19.5 Q1: Which statement about AudioClip methods is false?


a.Method play plays the audio once.
b.Method loop continuously loops the audio clip in the background.
c.Method stop terminates an audio clip that is playing.
d.Method makeAudioClip returns a reference to an AudioClip.
ANS: d. Method makeAudioClip returns a reference to an AudioClip.

19.5 Q2: Which statement is false?


a.Applet's play method can play a sound in an applet.
b.AudioClip interface method play can play a sound in an applet.
c.Applet method play loads a sound and plays it once.
d.A sound is garbage collected immediately after it is played by Applet method play.
ANS: d. A sound is garbage collected immediately after it is played by Applet method play.

19.5 Q3: This method returns the location of the applet’s .class file.
a.getDocumentBase.
b.getCodeBase.
c.getClassLocation.
d.getLocation.
ANS: b. getCodeBase.

© Copyright 2003 by Deitel & Associates, Inc. and Prentice Hall. All Rights Reserved.

Das könnte Ihnen auch gefallen