Deck 11: More Object-Oriented Programming Concepts

ملء الشاشة (f)
exit full mode
سؤال
The most common way to declare a destructor explicitly is to use an identifier that consists of ____.

A) a colon followed by the class name
B) a period followed by the class name
C) a tilde followed by the class name
D) an exclamation mark followed by the class name
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A class that is used as a basis for inheritance is called a ____ class or a superclass.

A) base
B) bottom
C) platform
D) derived
سؤال
A(n)____ in a class diagram indicates public access.

A) minus sign
B) diamond
C) plus sign
D) exclamation point
سؤال
Any constructor you write must have the same name as the class it constructs,and it cannot have a return type.
سؤال
You can create constructors for a class with or without parameters.
سؤال
It makes sense that a parent class object has access to its child's data and methods.
سؤال
A derived class always ____ case or instance of the more general base class.

A) has a
B) makes a
C) redefines a
D) is a
سؤال
An abstract class is one from which you can create any concrete objects and from which you can inherit.
سؤال
The built-in Exceptions in a programming language can cover every condition that might be an Exception in your applications.
سؤال
The entire list of parent classes from which a child class is derived constitutes the ____ of the subclass.

A) children
B) ancestors
C) subordinates
D) derivatives
سؤال
In object-oriented terminology,"default constructor" means a constructor with a single standard parameter.
سؤال
In some programming languages,such as C#,Visual Basic,and Java,every class you create is a child of one ultimate base class,often called the ____ class.

A) Top
B) Object
C) Ultimate
D) Mega
سؤال
The relationship created with composition is called a(n)____ relationship.

A) is-a
B) has-a
C) with-a
D) child
سؤال
A method's name and a list of argument types together are its ____.

A) signature
B) header
C) profile
D) interface
سؤال
You cannot provide parameters to a destructor;it must have an empty parameter list.
سؤال
If a constructor requires arguments,it is a ____ constructor.

A) reliable
B) private
C) default
D) nondefault
سؤال
When properly used,inheritance always involves a ____ relationship.

A) specific-to-general
B) general-to-specific
C) specific-to-specific
D) general-to-general
سؤال
By using standard component classes,programmers are assured that the GUI components in their programs have the same look and feel as those in other programs.
سؤال
When using existing objects,you need to concentrate only on the interface to those objects,not on the internal instructions that make them work.
سؤال
In OOP languages,a default constructor is created automatically by the compiler for every class you write.
سؤال
The capability to inherit from more than one class is called ____ inheritance.

A) poly
B) multiple
C) branch
D) dual
سؤال
Programmers use the phrase ____ to describe what happens when worthless or invalid input causes inaccurate or unrealistic results.

A) WIGO
B) GOGI
C) LIFO
D) GIGO
سؤال
In object-oriented terminology,the generic name used for errors is ____.

A) bugs
B) undefined branches
C) interfaces
D) exceptions
سؤال
Object-oriented programs employ a more specific group of techniques for handling errors called ____.

A) exception raising
B) exception management
C) exception handling
D) garbage collection
سؤال
Classes that depend on field names from parent classes are said to be ____ because they are prone to errors.

A) robust
B) innovative
C) fragile
D) constructive
سؤال
When you create a segment of code in which something might go wrong,you place the code in a ____ block.

A) throw
B) hold
C) try
D) catch
سؤال
____________________ is the mechanism by which a child class method is used by default when a parent class contains a method with the same signature.
سؤال
When a data field within a class is ____,no outside class can use it-including a child class.

A) reliable
B) fragile
C) private
D) protected
سؤال
When using ____________________,you can develop new classes more quickly by extending classes that already exist and work.
سؤال
When you purchase or download a(n)____ for an object-oriented programming language,it comes packaged with many predefined,built-in classes.

A) compiler
B) IDE
C) sunny day case
D) interpreter
سؤال
Code that has already been tested and used in a variety of situations is said to be ____.

A) protected
B) private
C) overloaded
D) reliable
سؤال
Libraries,collections of classes that serve related purposes,are also called ____________________.
سؤال
An instance of a class becomes eligible for destruction when it is no longer possible for any code to use it-that is,when it goes out of ____________________.
سؤال
If an exception is thrown,it is passed to a block of code that can ____,which means to receive it in a block that can handle the problem.

A) catch the exception
B) raise the exception
C) hold the exception
D) try the exception
سؤال
In traditional programming,probably the most often used error-handling outcome was to ____.

A) terminate the program in which the offending statement occurred
B) ignore the error
C) handle the error
D) ask the user for additional input
سؤال
____ are stored collections of classes that serve related purposes

A) Libraries
B) Constructors
C) IDE
D) Destructors
سؤال
By using ____,you can use reasonable,easy-to-remember names for methods and concentrate on their purpose rather than on memorizing different method names.

A) inheritance
B) inference
C) polymorphism
D) relationships
سؤال
You almost always code at least one catch block immediately following a(n)____________________ block.
سؤال
Programmers sometimes refer to a situation in which nothing goes wrong as the ____ case.

A) rainbow day
B) sunny day
C) cloudy day
D) pessimistic
سؤال
In several languages,the visual development environment is known by the acronym ____.

A) IDE
B) XML
C) ODI
D) IPE
سؤال
Match each term with a statement below.


-A method that has the same name as a class and that establishes an object

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Explain how to create your own throwable Exception.
سؤال
Match each term with a statement below.


-A block of code you attempt to execute while acknowledging that an exception might occur

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Describe the components of a try block.
سؤال
Explain composition.
سؤال
Match each term with a statement below.


-Contains the actions you require when an instance of a class is destroyed

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Match each term with a statement below.


-When a class contains objects of another class

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Discuss exception handling.
سؤال
Match each term with a statement below.


-Sends an Exception object out of the current code block or method so it can be handled elsewhere

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Match each term with a statement below.


-Collections of classes that serve related purposes

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
List three advantages of creating a useful,extendable superclass.
سؤال
Match each term with a statement below.


-A class from which you cannot create any concrete objects,but from which you can inherit

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Explain inheritance.
سؤال
Discuss the general principle of exception handling in object-oriented programming.
سؤال
Explain constructors.
سؤال
List the elements you would use to create a catch block.
سؤال
Match each term with a statement below.


-A segment of code that can handle an exception that might be thrown by the try block that precedes it

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Match each term with a statement below.


-Errors in object-oriented languages

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Match each term with a statement below.


-Used when you want no outside classes to be able to use a data field,except classes that are children of the original class

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
سؤال
Describe the Object class.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/60
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: More Object-Oriented Programming Concepts
1
The most common way to declare a destructor explicitly is to use an identifier that consists of ____.

A) a colon followed by the class name
B) a period followed by the class name
C) a tilde followed by the class name
D) an exclamation mark followed by the class name
C
2
A class that is used as a basis for inheritance is called a ____ class or a superclass.

A) base
B) bottom
C) platform
D) derived
A
3
A(n)____ in a class diagram indicates public access.

A) minus sign
B) diamond
C) plus sign
D) exclamation point
C
4
Any constructor you write must have the same name as the class it constructs,and it cannot have a return type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
5
You can create constructors for a class with or without parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
6
It makes sense that a parent class object has access to its child's data and methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
7
A derived class always ____ case or instance of the more general base class.

A) has a
B) makes a
C) redefines a
D) is a
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
8
An abstract class is one from which you can create any concrete objects and from which you can inherit.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
9
The built-in Exceptions in a programming language can cover every condition that might be an Exception in your applications.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
10
The entire list of parent classes from which a child class is derived constitutes the ____ of the subclass.

A) children
B) ancestors
C) subordinates
D) derivatives
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
11
In object-oriented terminology,"default constructor" means a constructor with a single standard parameter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
12
In some programming languages,such as C#,Visual Basic,and Java,every class you create is a child of one ultimate base class,often called the ____ class.

A) Top
B) Object
C) Ultimate
D) Mega
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
13
The relationship created with composition is called a(n)____ relationship.

A) is-a
B) has-a
C) with-a
D) child
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
14
A method's name and a list of argument types together are its ____.

A) signature
B) header
C) profile
D) interface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
15
You cannot provide parameters to a destructor;it must have an empty parameter list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
16
If a constructor requires arguments,it is a ____ constructor.

A) reliable
B) private
C) default
D) nondefault
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
17
When properly used,inheritance always involves a ____ relationship.

A) specific-to-general
B) general-to-specific
C) specific-to-specific
D) general-to-general
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
18
By using standard component classes,programmers are assured that the GUI components in their programs have the same look and feel as those in other programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
19
When using existing objects,you need to concentrate only on the interface to those objects,not on the internal instructions that make them work.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
20
In OOP languages,a default constructor is created automatically by the compiler for every class you write.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
21
The capability to inherit from more than one class is called ____ inheritance.

A) poly
B) multiple
C) branch
D) dual
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
22
Programmers use the phrase ____ to describe what happens when worthless or invalid input causes inaccurate or unrealistic results.

A) WIGO
B) GOGI
C) LIFO
D) GIGO
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
23
In object-oriented terminology,the generic name used for errors is ____.

A) bugs
B) undefined branches
C) interfaces
D) exceptions
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
24
Object-oriented programs employ a more specific group of techniques for handling errors called ____.

A) exception raising
B) exception management
C) exception handling
D) garbage collection
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
25
Classes that depend on field names from parent classes are said to be ____ because they are prone to errors.

A) robust
B) innovative
C) fragile
D) constructive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
26
When you create a segment of code in which something might go wrong,you place the code in a ____ block.

A) throw
B) hold
C) try
D) catch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
27
____________________ is the mechanism by which a child class method is used by default when a parent class contains a method with the same signature.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
28
When a data field within a class is ____,no outside class can use it-including a child class.

A) reliable
B) fragile
C) private
D) protected
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
29
When using ____________________,you can develop new classes more quickly by extending classes that already exist and work.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
30
When you purchase or download a(n)____ for an object-oriented programming language,it comes packaged with many predefined,built-in classes.

A) compiler
B) IDE
C) sunny day case
D) interpreter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
31
Code that has already been tested and used in a variety of situations is said to be ____.

A) protected
B) private
C) overloaded
D) reliable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
32
Libraries,collections of classes that serve related purposes,are also called ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
33
An instance of a class becomes eligible for destruction when it is no longer possible for any code to use it-that is,when it goes out of ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
34
If an exception is thrown,it is passed to a block of code that can ____,which means to receive it in a block that can handle the problem.

A) catch the exception
B) raise the exception
C) hold the exception
D) try the exception
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
35
In traditional programming,probably the most often used error-handling outcome was to ____.

A) terminate the program in which the offending statement occurred
B) ignore the error
C) handle the error
D) ask the user for additional input
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
36
____ are stored collections of classes that serve related purposes

A) Libraries
B) Constructors
C) IDE
D) Destructors
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
37
By using ____,you can use reasonable,easy-to-remember names for methods and concentrate on their purpose rather than on memorizing different method names.

A) inheritance
B) inference
C) polymorphism
D) relationships
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
38
You almost always code at least one catch block immediately following a(n)____________________ block.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
39
Programmers sometimes refer to a situation in which nothing goes wrong as the ____ case.

A) rainbow day
B) sunny day
C) cloudy day
D) pessimistic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
40
In several languages,the visual development environment is known by the acronym ____.

A) IDE
B) XML
C) ODI
D) IPE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match each term with a statement below.


-A method that has the same name as a class and that establishes an object

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
42
Explain how to create your own throwable Exception.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
43
Match each term with a statement below.


-A block of code you attempt to execute while acknowledging that an exception might occur

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
44
Describe the components of a try block.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
45
Explain composition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
46
Match each term with a statement below.


-Contains the actions you require when an instance of a class is destroyed

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
47
Match each term with a statement below.


-When a class contains objects of another class

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
48
Discuss exception handling.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
49
Match each term with a statement below.


-Sends an Exception object out of the current code block or method so it can be handled elsewhere

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
50
Match each term with a statement below.


-Collections of classes that serve related purposes

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
51
List three advantages of creating a useful,extendable superclass.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
52
Match each term with a statement below.


-A class from which you cannot create any concrete objects,but from which you can inherit

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
53
Explain inheritance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
54
Discuss the general principle of exception handling in object-oriented programming.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
55
Explain constructors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
56
List the elements you would use to create a catch block.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
57
Match each term with a statement below.


-A segment of code that can handle an exception that might be thrown by the try block that precedes it

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
58
Match each term with a statement below.


-Errors in object-oriented languages

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
59
Match each term with a statement below.


-Used when you want no outside classes to be able to use a data field,except classes that are children of the original class

A)exceptions
B)composition
C)abstract
D)try block
E)destructor
F)libraries
G)catch block
H)protected access specifier
I)throw statement
J)constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
60
Describe the Object class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.