Deck 13: Applets and More

ملء الشاشة (f)
exit full mode
سؤال
Web pages are normally written in

A) Hypertext Markup Language (HTML).
B) Extensible Markup Language (XML).
C) Standard Generalized Markup Language (SGML).
D) Generalized Markup Language (GML).
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
To make a Web page, you create a text file that contains HTML instructions, which are known as ________, as well as the text that should be displayed on the Web page.

A) markups
B) hypertext
C) labels
D) tags
سؤال
To run an applet, you create an HTML document with a(n) ________ tag.

A) script
B) applet
C) java
D) base
سؤال
The HTML tag that is used to insert a link has the following general format:

A) Text.
B) Text.
C) Text.
D) Text.
سؤال
The names of the AWT classes are the same as those of the Swing classes, except the AWT class names do not start with this letter.

A) J
B) X
C) S
D) A
سؤال
Which of the following is one way to get a reference to the Graphics object for an AWT component or a class that extends JApplet or JFrame?

A) Override the component's paint method.
B) Create a static instance of the Graphics object.
C) Pass an instance of the Graphics object as an argument to the component's constructor.
D) Create an instance of any class that extends the Graphics2D class.
سؤال
Applets run in a restricted environment to

A) allow the Web browser to communicate with the Web server.
B) prevent malicious code from attacking or spying on unsuspecting users.
C) execute operating system procedures on the user's system.
D) extend the capabilities of a Web page.
سؤال
Each component has an internal object that inherits from this class, which has numerous methods for drawing graphical shapes on the surface of the component.

A) Frame
B) Graphics
C) Panel
D) Shape
سؤال
Which of the following statements is correct regarding the line break
, paragraph break

, and horizontal rule


HTML tags.

A) These tags are unique from other tags because they do not occur in pairs.
B) These tags are used to create breaks in an HTML document's text.
C) When you use one of these tags, you insert only an opening tag.
D) All of the above
سؤال
These are Java programs that are usually part of a Web site.

A) classes
B) applications
C) applets
D) Web services
سؤال
For all Swing components except JApplet and JFrame, you should override this method to get a reference to the component's Graphics object.

A) paintComponent
B) paint
C) paintBase
D) repaint
سؤال
An applet class has a method named ________ that performs the same operations as a constructor.

A) init
B) enable
C) add
D) windowInit
سؤال
Which of the following statements would you write in an HTML document to display the text "History" as a level one header?

A)

History


B) History
C)
History

D) History
سؤال
When you draw a line or shape on a component, you must indicate its position using these.

A) X and Y coordinates
B) polar coordinates
C) line elements
D) quadrants and octants
سؤال
An HTML document is usually saved with this file name extension.

A) )xml
B) )html
C) )asp
D) )cfm
سؤال
An applet class inherits from this class.

A) JWindow
B) JViewport
C) JFrame
D) JApplet
سؤال
The point where two line segments are connected is called a

A) polygon.
B) cell.
C) vertex.
D) normal.
سؤال
In addition to displaying standard components such as buttons and labels, Java allows you to draw which of the following?

A) ovals
B) rectangles
C) arcs
D) All of the above
سؤال
This method draws a string as a graphic.

A) displayString
B) stringDraw
C) paintString
D) drawString
سؤال
The coordinates of the pixel in the upper-left corner of a component are usually

A) (1, 1).
B) (0, 0).
C) (-1, -1).
D) (100, 100).
سؤال
Java provides a(n) ________ class for all of the interfaces in the API that have more than one method.

A) converter
B) super
C) adapter
D) general
سؤال
In HTML, the

tag marks a document's head section, whereas the tag marks a header, which is large bold text.
سؤال
This method causes the Timer object to start generating action events.

A) start
B) go
C) tick
D) begin
سؤال
An applet does not have to be on a Web server in order to be executed.
سؤال
This method clears the surface of the component and then calls the paint method.

A) resurface
B) clear
C) repaint
D) refresh
سؤال
Once you create a mouse listener class, you can register it with a component using this method, which is inherited from the Component class.

A) addMouseListener
B) getMouseListenerEvent
C) initMouseListener
D) addMouseListenerEvent
سؤال
The mouse generates two types of events: mouse events and mouse motion events.
سؤال
When you update the data used to draw shapes on a component, you must call the repaint method to force a call to the paint or paintComponent methods.
سؤال
If you need to load a sound file to be played multiple times, you should use this object.

A) Album
B) Track
C) SoundByte
D) AudioClip
سؤال
If you want to make sure that an applet is compatible with all Java-enabled browsers, use AWT components instead of Swing.
سؤال
A mouse motion listener class must implement the MouseMotionListener interface, which is in this package.

A) javax.swing
B) java.awt.event
C) java.awt
D) java.lang
سؤال
Instead of displaying its own window, an applet appears in the browser's window.
سؤال
These classes implement the MouseListener and MouseMotionListener interfaces and provide empty definitions for all of the required methods.

A) MouseAdapter and MouseMotionAdapter
B) MouseTemplate and MouseMotionTemplate
C) MouseInterface and MouseMotionInterface
D) MouseBase and MouseMotionBase
سؤال
HTML has sophisticated abilities such as performing math calculations and interacting with the user.
سؤال
Applets are important because they can be used to extend the capabilities of a stand-alone Java application.
سؤال
The Applet class's ________ method loads a sound file, plays it one time, and then releases it for garbage collection.

A) load
B) play
C) sample
D) getSound
سؤال
There is no static main method needed to create an instance of the applet class because the browser creates an instance of the class automatically.
سؤال
A mouse listener class must implement this interface, which is in the java.awt.event package.

A) MouseEvent
B) MouseListener
C) MouseAction
D) MouseInterface
سؤال
An application can use this object to execute code automatically at regular time intervals.

A) Clock
B) Regulator
C) Meter
D) Timer
سؤال
A Timer object does not begin generating action events until it is started with a call to its getDelay method.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/40
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 13: Applets and More
1
Web pages are normally written in

A) Hypertext Markup Language (HTML).
B) Extensible Markup Language (XML).
C) Standard Generalized Markup Language (SGML).
D) Generalized Markup Language (GML).
A
2
To make a Web page, you create a text file that contains HTML instructions, which are known as ________, as well as the text that should be displayed on the Web page.

A) markups
B) hypertext
C) labels
D) tags
D
3
To run an applet, you create an HTML document with a(n) ________ tag.

A) script
B) applet
C) java
D) base
B
4
The HTML tag that is used to insert a link has the following general format:

A) Text.
B) Text.
C) Text.
D) Text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
5
The names of the AWT classes are the same as those of the Swing classes, except the AWT class names do not start with this letter.

A) J
B) X
C) S
D) A
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which of the following is one way to get a reference to the Graphics object for an AWT component or a class that extends JApplet or JFrame?

A) Override the component's paint method.
B) Create a static instance of the Graphics object.
C) Pass an instance of the Graphics object as an argument to the component's constructor.
D) Create an instance of any class that extends the Graphics2D class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
7
Applets run in a restricted environment to

A) allow the Web browser to communicate with the Web server.
B) prevent malicious code from attacking or spying on unsuspecting users.
C) execute operating system procedures on the user's system.
D) extend the capabilities of a Web page.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
8
Each component has an internal object that inherits from this class, which has numerous methods for drawing graphical shapes on the surface of the component.

A) Frame
B) Graphics
C) Panel
D) Shape
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which of the following statements is correct regarding the line break
, paragraph break

, and horizontal rule


HTML tags.

A) These tags are unique from other tags because they do not occur in pairs.
B) These tags are used to create breaks in an HTML document's text.
C) When you use one of these tags, you insert only an opening tag.
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
10
These are Java programs that are usually part of a Web site.

A) classes
B) applications
C) applets
D) Web services
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
11
For all Swing components except JApplet and JFrame, you should override this method to get a reference to the component's Graphics object.

A) paintComponent
B) paint
C) paintBase
D) repaint
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
12
An applet class has a method named ________ that performs the same operations as a constructor.

A) init
B) enable
C) add
D) windowInit
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which of the following statements would you write in an HTML document to display the text "History" as a level one header?

A)

History


B) History
C)
History

D) History
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
14
When you draw a line or shape on a component, you must indicate its position using these.

A) X and Y coordinates
B) polar coordinates
C) line elements
D) quadrants and octants
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
15
An HTML document is usually saved with this file name extension.

A) )xml
B) )html
C) )asp
D) )cfm
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
16
An applet class inherits from this class.

A) JWindow
B) JViewport
C) JFrame
D) JApplet
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
17
The point where two line segments are connected is called a

A) polygon.
B) cell.
C) vertex.
D) normal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
18
In addition to displaying standard components such as buttons and labels, Java allows you to draw which of the following?

A) ovals
B) rectangles
C) arcs
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
19
This method draws a string as a graphic.

A) displayString
B) stringDraw
C) paintString
D) drawString
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
20
The coordinates of the pixel in the upper-left corner of a component are usually

A) (1, 1).
B) (0, 0).
C) (-1, -1).
D) (100, 100).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
21
Java provides a(n) ________ class for all of the interfaces in the API that have more than one method.

A) converter
B) super
C) adapter
D) general
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
22
In HTML, the

tag marks a document's head section, whereas the tag marks a header, which is large bold text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
23
This method causes the Timer object to start generating action events.

A) start
B) go
C) tick
D) begin
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
24
An applet does not have to be on a Web server in order to be executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
25
This method clears the surface of the component and then calls the paint method.

A) resurface
B) clear
C) repaint
D) refresh
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
26
Once you create a mouse listener class, you can register it with a component using this method, which is inherited from the Component class.

A) addMouseListener
B) getMouseListenerEvent
C) initMouseListener
D) addMouseListenerEvent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
27
The mouse generates two types of events: mouse events and mouse motion events.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
28
When you update the data used to draw shapes on a component, you must call the repaint method to force a call to the paint or paintComponent methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
29
If you need to load a sound file to be played multiple times, you should use this object.

A) Album
B) Track
C) SoundByte
D) AudioClip
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
30
If you want to make sure that an applet is compatible with all Java-enabled browsers, use AWT components instead of Swing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
31
A mouse motion listener class must implement the MouseMotionListener interface, which is in this package.

A) javax.swing
B) java.awt.event
C) java.awt
D) java.lang
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
32
Instead of displaying its own window, an applet appears in the browser's window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
33
These classes implement the MouseListener and MouseMotionListener interfaces and provide empty definitions for all of the required methods.

A) MouseAdapter and MouseMotionAdapter
B) MouseTemplate and MouseMotionTemplate
C) MouseInterface and MouseMotionInterface
D) MouseBase and MouseMotionBase
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
34
HTML has sophisticated abilities such as performing math calculations and interacting with the user.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
35
Applets are important because they can be used to extend the capabilities of a stand-alone Java application.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
36
The Applet class's ________ method loads a sound file, plays it one time, and then releases it for garbage collection.

A) load
B) play
C) sample
D) getSound
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
37
There is no static main method needed to create an instance of the applet class because the browser creates an instance of the class automatically.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
38
A mouse listener class must implement this interface, which is in the java.awt.event package.

A) MouseEvent
B) MouseListener
C) MouseAction
D) MouseInterface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
39
An application can use this object to execute code automatically at regular time intervals.

A) Clock
B) Regulator
C) Meter
D) Timer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
40
A Timer object does not begin generating action events until it is started with a call to its getDelay method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.