Deck 6: Graphical User Interface Gui and Object-Oriented Design OOD

ملء الشاشة (f)
exit full mode
سؤال
The class ActionListener contains only one method, actionEvent.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
GUI components are placed in a window called JFrame.
سؤال
In Java, extends is a reserved word.
سؤال
The GridLayout manager arranges GUI components in a list formation.
سؤال
When you click a JButton, an event, known as an action event, is created.
سؤال
In object-oriented design, the verbs in the problem specification can be used to identify the objects in the program.
سؤال
The first step in solving a problem using object-oriented design is to identify objects.
سؤال
Whenever there is a superclass-subclass relationship, the superclass inherits all data members and methods of the subclass.
سؤال
JTextFields are used to get input, but not show output.
سؤال
The method addWindowListener is included in the class JFrame.
سؤال
The class Container is included in the package java.awt.
سؤال
The class JFrame contains the method setSize.
سؤال
In object-oriented design, the nouns found in the problem specification can be used to select the operations in the program.
سؤال
If lengthTF is a JTextField and pane is a container, then the statement pane.add(lengthTF); adds the text field to the content pane of a window.
سؤال
The height and width of a window are measured in inches.
سؤال
In Java, there is one way to make an application program create a window.
سؤال
An interface is a class that contains only the method headings and each method heading is terminated with a semicolon.
سؤال
In Java, data members are also known as fields.
سؤال
Every window has a title, width, and height.
سؤال
The method getContentPane of the class JFrame is used to access the content pane of the window.
سؤال
To determine whether two reference variables of the Integer type point to the same Integer object, we can use either the method equals of the class Integer or the operator ==.
سؤال
Given the declaration, Integer num; The statement num = 8; is known as autoboxing of int type.
سؤال
A(n) ____ is a method of a class that is automatically executed when an object of the class is created.

A) inheritance
C) constructor
B) package
D) interface
سؤال
<strong>  Which of the following is NOT found within the content pane?</strong> A) labels C) text areas B) title bar D) buttons <div style=padding-top: 35px>
Which of the following is NOT found within the content pane?

A) labels
C) text areas
B) title bar
D) buttons
سؤال
Given the declaration, Integer x; After executing either of the following two statements, x points to an Integer object with value 8: x = 8; x = new Integer(8);
سؤال
Which of the following methods is NOT part of the class JFrame?

A) setVisible
C) setTitle
B) setSize
D) getText
سؤال
<strong>  Which of the following from the window above is a JButton?</strong> A) Calculate C) Both Calculate and Exit B) Exit D) Perimeter <div style=padding-top: 35px>
Which of the following from the window above is a JButton?

A) Calculate
C) Both Calculate and Exit
B) Exit
D) Perimeter
سؤال
To create a window, which of the following classes has to be extended?

A) Container
C) JButton
B) JFrame
D) JTextField
سؤال
To compare the values of two Integer objects for equality, we can use the method equals of the class Integer.
سؤال
Which word goes in the first blank in the sentence above?

A) subclass
C) inherited class
B) superclass
D) package
سؤال
<strong>  The white areas in the figure above are used to do which of the following?</strong> A) Show output C) Get input and show results B) Get input D) Display a prompt to the user <div style=padding-top: 35px>
The white areas in the figure above are used to do which of the following?

A) Show output
C) Get input and show results
B) Get input
D) Display a prompt to the user
سؤال
Wrapper class objects are mutable.
سؤال
<strong>  Which of the following statements is NOT true about GUI programs?</strong> A) Every GUI program requires a window. B) Every window has a title, width, and height. C) All components are added directly to the GUI window. D) A layout must be created before components can be added to a content pane. <div style=padding-top: 35px>
Which of the following statements is NOT true about GUI programs?

A) Every GUI program requires a window.
B) Every window has a title, width, and height.
C) All components are added directly to the GUI window.
D) A layout must be created before components can be added to a content pane.
سؤال
To display a window, you must invoke the method ____.

A) displayWindow
C) setVisible
B) show
D) setDisplay
سؤال
Which of the following is a reserved word in Java?

A) extends
C) event
B) pane
D) inheritance
سؤال
<strong>  The Java class that you use to create windows is ____.</strong> A) JTextField C) JButton B) JFrame D) JLabel <div style=padding-top: 35px>
The Java class that you use to create windows is ____.

A) JTextField
C) JButton
B) JFrame
D) JLabel
سؤال
Which of the following sets the window width to 100 pixels and the height to 200 pixels?

A) setSize(100, 200);
C) setDims(100, 200);
B) setSize(200, 100);
D) set(200, 100);
سؤال
Which word goes in the second blank of the sentence above?

A) subclass
C) method
B) superclass
D) package
سؤال
Which class is part of the package java.awt?

A) JFrame
C) JOptionPane
B) JButton
D) Container
سؤال
<strong>  Which of the following is NOT a required attribute of a window?</strong> A) title C) height B) width D) color <div style=padding-top: 35px>
Which of the following is NOT a required attribute of a window?

A) title
C) height
B) width
D) color
سؤال
Which of the following is not a method of the class JTextField?

A) setText
C) addActionListener
B) setEditable
D) setVisible
سؤال
According to the problem statement above, which of the following would be a data member?

A) Radius of the base
C) Volume
B) Surface area
D) Input
سؤال
Which package will you most likely have to import in order to write a GUI program?

A) java.awt.*
C) java.text.*
B) java.io.*
D) java.net.*
سؤال
What is the name for Java classes that are provided so that values of primitive data types can be treated as objects?

A) interfaces
C) wrappers
B) extensions
D) event handlers
سؤال
Which modifier is used to build classes on top of classes that are interfaces?

A) private
C) new
B) public
D) implements
سؤال
Based on the problem statement above, which of the following would be a data member?

A) hoursWorked
C) pay
B) employee
D) job
سؤال
Based on the problem statement above, which of the following would most likely be chosen as the class?

A) Pay_Rate
C) Employee
B) Hours_Worked
D) Pay
سؤال
Which words from the problem statement above could we use to determine the operations for this program?

A) input, calculate, print
C) height, cylinder, radius
B) cylinder, program, volume
D) radius, cylinder, print
سؤال
Which method is used to register a listener object to a button object?

A) addActionListener
C) eventButton
B) registerButton
D) buttonListener
سؤال
Which method contains the code that the program executes when a specific event is generated?

A) buttonListener
C) actionPerformed
B) GUIListener
D) windowListener
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 6: Graphical User Interface Gui and Object-Oriented Design OOD
1
The class ActionListener contains only one method, actionEvent.
False
2
GUI components are placed in a window called JFrame.
True
3
In Java, extends is a reserved word.
True
4
The GridLayout manager arranges GUI components in a list formation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
When you click a JButton, an event, known as an action event, is created.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
In object-oriented design, the verbs in the problem specification can be used to identify the objects in the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
The first step in solving a problem using object-oriented design is to identify objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Whenever there is a superclass-subclass relationship, the superclass inherits all data members and methods of the subclass.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
JTextFields are used to get input, but not show output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
The method addWindowListener is included in the class JFrame.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The class Container is included in the package java.awt.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The class JFrame contains the method setSize.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
In object-oriented design, the nouns found in the problem specification can be used to select the operations in the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
If lengthTF is a JTextField and pane is a container, then the statement pane.add(lengthTF); adds the text field to the content pane of a window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
The height and width of a window are measured in inches.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
In Java, there is one way to make an application program create a window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
An interface is a class that contains only the method headings and each method heading is terminated with a semicolon.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
In Java, data members are also known as fields.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Every window has a title, width, and height.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The method getContentPane of the class JFrame is used to access the content pane of the window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
To determine whether two reference variables of the Integer type point to the same Integer object, we can use either the method equals of the class Integer or the operator ==.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Given the declaration, Integer num; The statement num = 8; is known as autoboxing of int type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
A(n) ____ is a method of a class that is automatically executed when an object of the class is created.

A) inheritance
C) constructor
B) package
D) interface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
<strong>  Which of the following is NOT found within the content pane?</strong> A) labels C) text areas B) title bar D) buttons
Which of the following is NOT found within the content pane?

A) labels
C) text areas
B) title bar
D) buttons
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Given the declaration, Integer x; After executing either of the following two statements, x points to an Integer object with value 8: x = 8; x = new Integer(8);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Which of the following methods is NOT part of the class JFrame?

A) setVisible
C) setTitle
B) setSize
D) getText
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
<strong>  Which of the following from the window above is a JButton?</strong> A) Calculate C) Both Calculate and Exit B) Exit D) Perimeter
Which of the following from the window above is a JButton?

A) Calculate
C) Both Calculate and Exit
B) Exit
D) Perimeter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
To create a window, which of the following classes has to be extended?

A) Container
C) JButton
B) JFrame
D) JTextField
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
To compare the values of two Integer objects for equality, we can use the method equals of the class Integer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Which word goes in the first blank in the sentence above?

A) subclass
C) inherited class
B) superclass
D) package
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
<strong>  The white areas in the figure above are used to do which of the following?</strong> A) Show output C) Get input and show results B) Get input D) Display a prompt to the user
The white areas in the figure above are used to do which of the following?

A) Show output
C) Get input and show results
B) Get input
D) Display a prompt to the user
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
Wrapper class objects are mutable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
<strong>  Which of the following statements is NOT true about GUI programs?</strong> A) Every GUI program requires a window. B) Every window has a title, width, and height. C) All components are added directly to the GUI window. D) A layout must be created before components can be added to a content pane.
Which of the following statements is NOT true about GUI programs?

A) Every GUI program requires a window.
B) Every window has a title, width, and height.
C) All components are added directly to the GUI window.
D) A layout must be created before components can be added to a content pane.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
To display a window, you must invoke the method ____.

A) displayWindow
C) setVisible
B) show
D) setDisplay
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Which of the following is a reserved word in Java?

A) extends
C) event
B) pane
D) inheritance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
<strong>  The Java class that you use to create windows is ____.</strong> A) JTextField C) JButton B) JFrame D) JLabel
The Java class that you use to create windows is ____.

A) JTextField
C) JButton
B) JFrame
D) JLabel
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Which of the following sets the window width to 100 pixels and the height to 200 pixels?

A) setSize(100, 200);
C) setDims(100, 200);
B) setSize(200, 100);
D) set(200, 100);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Which word goes in the second blank of the sentence above?

A) subclass
C) method
B) superclass
D) package
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Which class is part of the package java.awt?

A) JFrame
C) JOptionPane
B) JButton
D) Container
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
<strong>  Which of the following is NOT a required attribute of a window?</strong> A) title C) height B) width D) color
Which of the following is NOT a required attribute of a window?

A) title
C) height
B) width
D) color
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
Which of the following is not a method of the class JTextField?

A) setText
C) addActionListener
B) setEditable
D) setVisible
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
According to the problem statement above, which of the following would be a data member?

A) Radius of the base
C) Volume
B) Surface area
D) Input
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
Which package will you most likely have to import in order to write a GUI program?

A) java.awt.*
C) java.text.*
B) java.io.*
D) java.net.*
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
What is the name for Java classes that are provided so that values of primitive data types can be treated as objects?

A) interfaces
C) wrappers
B) extensions
D) event handlers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
Which modifier is used to build classes on top of classes that are interfaces?

A) private
C) new
B) public
D) implements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
Based on the problem statement above, which of the following would be a data member?

A) hoursWorked
C) pay
B) employee
D) job
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
Based on the problem statement above, which of the following would most likely be chosen as the class?

A) Pay_Rate
C) Employee
B) Hours_Worked
D) Pay
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
Which words from the problem statement above could we use to determine the operations for this program?

A) input, calculate, print
C) height, cylinder, radius
B) cylinder, program, volume
D) radius, cylinder, print
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
Which method is used to register a listener object to a button object?

A) addActionListener
C) eventButton
B) registerButton
D) buttonListener
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
Which method contains the code that the program executes when a specific event is generated?

A) buttonListener
C) actionPerformed
B) GUIListener
D) windowListener
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.