Exam 17: Applets, Images, and Sound
Exam 1: Creating Java Programs68 Questions
Exam 2: Using Data74 Questions
Exam 3: Using Methods, Classes, and Objects68 Questions
Exam 4: More Object Concepts67 Questions
Exam 5: Making Decisions70 Questions
Exam 6: Looping72 Questions
Exam 7: Characters, Strings, and the Stringbuilder73 Questions
Exam 8: Arrays74 Questions
Exam 9: Advanced Array Concepts74 Questions
Exam 10: Introduction to Inheritance70 Questions
Exam 11: Advanced Inheritance Concepts70 Questions
Exam 12: Exception Handling65 Questions
Exam 13: File Input and Output74 Questions
Exam 14: Introduction to Swing Components74 Questions
Exam 15: Advanced Gui Topics69 Questions
Exam 16: Graphics74 Questions
Exam 17: Applets, Images, and Sound72 Questions
Select questions type
By calling ____ in an applet, you get a URL object that represents the folder in which the applet's class file is stored.
(Multiple Choice)
4.8/5
(39)
What are the three object tag attributes commonly used to run an applet?
(Essay)
4.9/5
(39)
Usually, you place three attributes within the <object> tag: code, width, and ____.
(Multiple Choice)
4.9/5
(30)
Match each term with the correct statement below.
-Provides a convenient environment in which to test your applets
(Multiple Choice)
5.0/5
(34)
____ contains many commands that allow you to format text on a Web page, import graphic images, and link your page to other Web pages.
(Multiple Choice)
4.8/5
(45)
<object code = "AClass.class" width = 300 height = 200> </object>
Using the above statement, identify the three object tag attributes and their corresponding arguments.
(Essay)
4.7/5
(37)
<html>
____________________________
</object>
</html>
In the blank line provided, write the code to run a JApplet named JGreeting that will be 370 pixels wide by 110 pixels tall.
(Essay)
4.8/5
(31)
import java.awt.*;
import java.applet.*;
import javax.swing.*;
public class JSound extends JApplet
{
AudioClip sound;
public void init()
{
sound = getAudioClip(getCodeBase(),"mysteryTune.au");
}
public void start()
{
___________________________________
}
public void stop()
{
___________________________________
}
public void paint(Graphics g)
{
super.paint(g);
Graphics2D g2D = (Graphics2D)g;
g2D.drawString("Listen to the mystery tune ", 10, 10);
}
}
In the first shaded line provided, write the loop() method to play the mysteryTune.au sound continually. On the second shaded line, write the stop() method to halt the mysteryTune.au sound file.
(Short Answer)
4.7/5
(40)
Because applets execute in a browser, the JApplet class contains methods that are automatically called by the browser.
(True/False)
4.9/5
(43)
Showing 61 - 72 of 72
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)