Deck 4: Data Abstraction: The Walls
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/60
العب
ملء الشاشة (f)
Deck 4: Data Abstraction: The Walls
1
The ADT sorted list inserts and deletes items by their ______.
A)name
B)value
C)position name
D)position number
A)name
B)value
C)position name
D)position number
B
2
Which of the following operations of the ADT list changes the list?
A)remove
B)isEmpty
C)size
D)get
A)remove
B)isEmpty
C)size
D)get
A
3
The items in the ADT list are referenced by ______.
A)name
B)value
C)position number
D)position name
A)name
B)value
C)position number
D)position name
C
4
A(n)______ can be used to precisely specify the behavior of each of the operations of an ADT.
A)exception
B)data structure
C)axiom
D)client
A)exception
B)data structure
C)axiom
D)client
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
5
A method's contract includes the method's ______.
A)code
B)algorithm(s)
C)implementation
D)specifications
A)code
B)algorithm(s)
C)implementation
D)specifications
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
6
A(n)______ is a Java construct that enables a programmer to define a new data type.
A)class
B)method
C)data field
D)object
A)class
B)method
C)data field
D)object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
7
Encapsulation combines an ADT's data with its operations to form a(n)______.
A)exception
B)method
C)object
D)variable
A)exception
B)method
C)object
D)variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
8
Data structures are part of an ADT's ______.
A)definition
B)implementation
C)specifications
D)usage
A)definition
B)implementation
C)specifications
D)usage
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
9
An ADT's ______ govern(s)what its operations are and what they do.
A)specifications
B)implementation
C)documentation
D)data structure
A)specifications
B)implementation
C)documentation
D)data structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
10
Object-oriented programming views a program as ______.
A)a sequence of actions
B)a sequence of statements
C)a group of methods
D)a collection of objects
A)a sequence of actions
B)a sequence of statements
C)a group of methods
D)a collection of objects
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
11
An ADT's operations are known as its ______.
A)axioms
B)methods
C)variables
D)interfaces
A)axioms
B)methods
C)variables
D)interfaces
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
12
In the following list: John,Kate,Fred,Mark,Jon,Adam,Drew
Which element does not have a predecessor?
A)John
B)Mark
C)Drew
D)Kate
Which element does not have a predecessor?
A)John
B)Mark
C)Drew
D)Kate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
13
In the ADT list,when an item is deleted from position i of the list,______.
A)the position of all items is decreased by 1
B)the position of each item that was at a position smaller than i is decreased by 1
C)the position of each item that was at a position greater than i is decreased by 1
D)the position of each item that was at a position smaller than i is increased by 1 while the position of each item that was at a position greater than i is decreased by 1
A)the position of all items is decreased by 1
B)the position of each item that was at a position smaller than i is decreased by 1
C)the position of each item that was at a position greater than i is decreased by 1
D)the position of each item that was at a position smaller than i is increased by 1 while the position of each item that was at a position greater than i is decreased by 1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
14
A program that uses an ADT is called a(n)______.
A)data structure
B)interface
C)axiom
D)client
A)data structure
B)interface
C)axiom
D)client
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
15
The specifications of an ADT's operations indicate ______.
A)what the operations do
B)how to implement the operations
C)how to store the data in the ADT
D)how to carry out the operations
A)what the operations do
B)how to implement the operations
C)how to store the data in the ADT
D)how to carry out the operations
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
16
In the following list: John,Kate,Fred,Mark,Jon,Adam,Drew
Which element is the head of the list?
A)John
B)Mark
C)Drew
D)Adam
Which element is the head of the list?
A)John
B)Mark
C)Drew
D)Adam
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
17
A(n)______ allows two modules to communicate with each other.
A)data structure
B)axiom
C)interface
D)client
A)data structure
B)axiom
C)interface
D)client
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
18
The insertion operation of the ADT list can insert new items ______.
A)only at the front of the list
B)only at the end of the list
C)only in the middle of the list
D)into any position of the list
A)only at the front of the list
B)only at the end of the list
C)only in the middle of the list
D)into any position of the list
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
19
In the ADT list,when an item is inserted into position i of the list,______.
A)the position of all items is increased by 1
B)the position of each item that was at a position smaller than i is increased by 1
C)the position of each item that was at a position greater than i is increased by 1
D)the position of each item that was at a position smaller than i is decreased by 1 while the position of each item that was at a position greater than i is increased by 1
A)the position of all items is increased by 1
B)the position of each item that was at a position smaller than i is increased by 1
C)the position of each item that was at a position greater than i is increased by 1
D)the position of each item that was at a position smaller than i is decreased by 1 while the position of each item that was at a position greater than i is increased by 1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
20
In the following list: John,Kate,Fred,Mark,Jon,Adam,Drew
Which element is the tail of the list?
A)John
B)Mark
C)Drew
D)Adam
Which element is the tail of the list?
A)John
B)Mark
C)Drew
D)Adam
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n)______ is an instance of a class.
A)method
B)data field
C)interface
D)object
A)method
B)data field
C)interface
D)object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
22
Which of the following is true about runtime exceptions?
A)they must be handled locally
B)they must be explicitly thrown from the method
C)they are used in situations where the method has encountered a serious problem
D)they can often be prevented by fail-safe programming
A)they must be handled locally
B)they must be explicitly thrown from the method
C)they are used in situations where the method has encountered a serious problem
D)they can often be prevented by fail-safe programming
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
23
All the items in a list must be of the same data type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
24
A default Java constructor has a single parameter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
25
Data structures are part of an ADT's implementation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
26
A class contains methods and ______.
A)clients
B)interfaces
C)data fields
D)data structures
A)clients
B)interfaces
C)data fields
D)data structures
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
27
To ______ an exception means to deal with the error condition.
A)throw
B)catch
C)implement
D)declare
A)throw
B)catch
C)implement
D)declare
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
28
A method indicates that an error has occurred by ______ an exception.
A)throwing
B)catching
C)implementing
D)declaring
A)throwing
B)catching
C)implementing
D)declaring
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
29
In Java,a class can extend ______.
A)at most 1 class
B)at most 16 classes
C)at most 32 classes
D)as many classes as required
A)at most 1 class
B)at most 16 classes
C)at most 32 classes
D)as many classes as required
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
30
According to the principle of information hiding,a module should be completely isolated from other modules.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
31
An abstract data type is another name for a data structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
32
The ______ keyword is used to call the constructor of the superclass.
A)extends
B)super
C)this
D)implements
A)extends
B)super
C)this
D)implements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
33
By default,all members in a class are public.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
34
The head of a list does not have a successor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
35
Any instance of a subclass can be used in a program anywhere that an instance of the superclass can be used.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
36
The definition of a subclass includes a(n)______ clause to indicate its superclass.
A)extends
B)super
C)this
D)implements
A)extends
B)super
C)this
D)implements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
37
All constructors in Java have a return type of void.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
38
A(n)______ is a class that inherits the members of another class.
A)base class
B)superclass
C)abstract class
D)subclass
A)base class
B)superclass
C)abstract class
D)subclass
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
39
Which of the following is true about a constructor in Java?
A)all constructors have a return type of void
B)a constructor cannot have parameters
C)a constructor has the same name as the class
D)a class can only have a single constructor
A)all constructors have a return type of void
B)a constructor cannot have parameters
C)a constructor has the same name as the class
D)a class can only have a single constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
40
An application can use the operations of an ADT without knowing how the ADT is implemented.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is a data structure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
42
Define the client of a class?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
43
Give three examples of ADT operations that ask questions about the data in a collection.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
44
What is information hiding?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
45
How do checked exceptions and runtime exceptions differ in the way that they are handled?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
46
What are the three types of operations on data?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
47
What is procedural abstraction?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
48
What feature of Java allows you to enforce information hiding when you define a class such as an ADT?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
49
What is a constructor?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
50
What is an abstract data type (ADT)?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
51
Do all Java source files define classes? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
52
What is a superclass?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
53
What is the difference between the physical size and the logical size of an array?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
54
What is data abstraction?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
55
When is a compiler-generated default constructor created?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
56
What does it mean for a class to "implement an interface" ?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
57
What are exceptions used for?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
58
If an ADT list is implemented as an array,why would it be necessary for the ADT operations to "shift" elements?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
59
What are some of the benefits of modularity?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
60
What is an axiom?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck