Deck 8: More Object Concepts

Full screen (f)
exit full mode
Question
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)Initial
C)Core
B)Object
D)Basic
Use Space or
up arrow
down arrow
to flip the card.
Question
A child class contains all the data fields and ____ of its parent.

A)parameters
C)methods
B)classes
D)procedures
Question
A constructor may require ____.

A)parameters
C)objects
B)methods
D)inheritance
Question
A destructor contains the actions you require when an instance of a class is destroyed.
Question
A destructor cannot execute unless it is explicitly called from a program.
Question
When you instantiate an object that is a member of a class, you are actually calling a constructor method.
Question
Using inheritance saves time since you do not need to recreate a class's methods and data fields.
Question
A(n) ____ cannot be overloaded.

A)instance method
C)constructor
B)method
D)destructor
Question
____ is the process of creating a new, derived class from a base class.

A)Accessibility
C)Inheritance
B)Encapsulation
D)Polymorphism
Question
One way to give a child class access to a private data field in a parent class is to make the data field public in the parent class.
Question
When declaring a destructor, which character is used?

A)pound sign
C)tilde
B)asterisk
D)exclamation point
Question
A(n) ____ is a method that establishes an object, reserving enough memory space for it and providing its name.

A)destructor
C)inheritor
B)constructor
D)originator
Question
Derived classes usually have fields and methods that are more ____ than those of their parent classes.

A)stable
C)basic
B)generalized
D)specialized
Question
A superclass member that is not hidden is invisible in the derived class.
Question
A class's ____constructor is automatically supplied.

A)initial
C)default
B)object
D)destructor
Question
If a class's only constructor requires an argument, you must provide an argument for every object of the class you create.
Question
An instance method or constructor may be overloaded by providing the same name and ____ argument list.

A)a different
C)a larger
B)the same
D)a smaller
Question
Methods that are inherited from a parent class can be overridden.
Question
A superclass is the same thing as a derived class.
Question
All default constructors are automatically supplied.
Question
Code that has been used and tested is said to be ____.

A)responsible
C)inherited
B)reliable
D)encapsulated
Question
A(n) ____ constructor is one that requires no arguments.

A)automatic
C)original
B)implicit
D)default
Question
The ____________________ of a subclass consist of the entire list of parent classes from which a child class is derived.
Question
When a superclass requires parameters upon instantiation, even if you have no other reason to create a(n) ____, you must write one so it can call its superclass's constructor.

A)overridden method
C)subclass constructor
B)public subclass
D)subclass destructor
Question
When a data field is private, it is said to be ____ to any class other than the one in which it is defined.

A)uninheritable
C)unreachable
B)implicit
D)inaccessible
Question
A subclass constructor can pass ____ or parameters to its parent constructor.

A)constants
C)objects
B)methods
D)classes
Question
Every derived class "____" specific instance of the base class and the derived class.

A)instantiates a
C)was a
B)has a
D)is a
Question
An ____ child class method has the same name and different parameter list as the parent class method.

A)overridden
C)overbearing
B)overloaded
D)inherited
Question
When a superclass contains only constructors that require arguments, you must include at least ____ constructor(s) for each subclass you create.

A)zero
C)two
B)one
D)three
Question
You can write as many constructors for a class as you want, as long as they all have different ____ lists.

A)object
C)method
B)data field
D)parameter
Question
What is accomplished when you assign a derived class object to an object of any of its superclass types?

A)implicit conversion
C)instantiation
B)explicit conversion
D)inheritance
Question
When you create any subclass object, the ____ constructor must execute first, and then the ____ constructor executes.

A)subclass, superclass
C)default, specialized
B)superclass, subclass
D)default, superclass
Question
A ____________________ is declared with the class name preceded by a tilde (~), and you supply no arguments.
Question
In a class diagram, what symbol is used for the protected access modifier?

A)pound sign
C)dollar sign
B)asterisk
D)exclamation point
Question
An ____ child class method contains the same name and parameters as the parent class method.

A)overridden
C)overbearing
B)overloaded
D)inherited
Question
What is the name of the access modifier that gives child classes access to the parent class's data fields?

A)private
C)public
B)protected
D)semi-private
Question
A(n) ____________________ is used as the basis for inheritance.
Question
A(n) ____________________ constructor is a constructor with no parameters.
Question
The type of polymorphism that applies specifically to objects of the same parent class is sometimes called ____ polymorphism.

A)subtype
C)dual
B)subclass
D)inherited
Question
The ____________________ establishes an object by reserving enough memory space for it and possibly initializing member variables.
Question
A(n) ____________________ conversion is made whenever you assign a derived class object to an object of any types that are ancestors.
Question
A(n) ___________________ is another name for a child class and derived class.
Question
If the class Poodle inherits from the class Dog, then Dog is a(n) ____________________ of Poodle.
Question
When you override a method in a child class, you create a method with the same name and ____________________ as the parent's version.
Question
A(n) ____________________ class is one from which you can inherit, but not create, any object.
Question
Classes that depend on field names from parent classes are said to be ____________________ because they are prone to errors.
Question
The capability to inherit from more than one class is called ____________________.
Question
Professional programmers constantly create new class ____________________ for use with OOP languages.
Question
Reliable code has been thoroughly ____________________ and can probably be used in a variety of situations.
Question
A method in a parent class must be ____________________ in order to be used by the child class.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 8: More Object Concepts
1
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)Initial
C)Core
B)Object
D)Basic
B
2
A child class contains all the data fields and ____ of its parent.

A)parameters
C)methods
B)classes
D)procedures
C
3
A constructor may require ____.

A)parameters
C)objects
B)methods
D)inheritance
A
4
A destructor contains the actions you require when an instance of a class is destroyed.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
A destructor cannot execute unless it is explicitly called from a program.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
When you instantiate an object that is a member of a class, you are actually calling a constructor method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Using inheritance saves time since you do not need to recreate a class's methods and data fields.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
A(n) ____ cannot be overloaded.

A)instance method
C)constructor
B)method
D)destructor
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
____ is the process of creating a new, derived class from a base class.

A)Accessibility
C)Inheritance
B)Encapsulation
D)Polymorphism
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
One way to give a child class access to a private data field in a parent class is to make the data field public in the parent class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
When declaring a destructor, which character is used?

A)pound sign
C)tilde
B)asterisk
D)exclamation point
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
A(n) ____ is a method that establishes an object, reserving enough memory space for it and providing its name.

A)destructor
C)inheritor
B)constructor
D)originator
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
Derived classes usually have fields and methods that are more ____ than those of their parent classes.

A)stable
C)basic
B)generalized
D)specialized
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
A superclass member that is not hidden is invisible in the derived class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
A class's ____constructor is automatically supplied.

A)initial
C)default
B)object
D)destructor
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
If a class's only constructor requires an argument, you must provide an argument for every object of the class you create.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
An instance method or constructor may be overloaded by providing the same name and ____ argument list.

A)a different
C)a larger
B)the same
D)a smaller
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Methods that are inherited from a parent class can be overridden.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
A superclass is the same thing as a derived class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
All default constructors are automatically supplied.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Code that has been used and tested is said to be ____.

A)responsible
C)inherited
B)reliable
D)encapsulated
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
A(n) ____ constructor is one that requires no arguments.

A)automatic
C)original
B)implicit
D)default
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
The ____________________ of a subclass consist of the entire list of parent classes from which a child class is derived.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
When a superclass requires parameters upon instantiation, even if you have no other reason to create a(n) ____, you must write one so it can call its superclass's constructor.

A)overridden method
C)subclass constructor
B)public subclass
D)subclass destructor
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
When a data field is private, it is said to be ____ to any class other than the one in which it is defined.

A)uninheritable
C)unreachable
B)implicit
D)inaccessible
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
A subclass constructor can pass ____ or parameters to its parent constructor.

A)constants
C)objects
B)methods
D)classes
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Every derived class "____" specific instance of the base class and the derived class.

A)instantiates a
C)was a
B)has a
D)is a
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
An ____ child class method has the same name and different parameter list as the parent class method.

A)overridden
C)overbearing
B)overloaded
D)inherited
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
When a superclass contains only constructors that require arguments, you must include at least ____ constructor(s) for each subclass you create.

A)zero
C)two
B)one
D)three
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
You can write as many constructors for a class as you want, as long as they all have different ____ lists.

A)object
C)method
B)data field
D)parameter
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
What is accomplished when you assign a derived class object to an object of any of its superclass types?

A)implicit conversion
C)instantiation
B)explicit conversion
D)inheritance
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
When you create any subclass object, the ____ constructor must execute first, and then the ____ constructor executes.

A)subclass, superclass
C)default, specialized
B)superclass, subclass
D)default, superclass
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
A ____________________ is declared with the class name preceded by a tilde (~), and you supply no arguments.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
In a class diagram, what symbol is used for the protected access modifier?

A)pound sign
C)dollar sign
B)asterisk
D)exclamation point
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
An ____ child class method contains the same name and parameters as the parent class method.

A)overridden
C)overbearing
B)overloaded
D)inherited
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
What is the name of the access modifier that gives child classes access to the parent class's data fields?

A)private
C)public
B)protected
D)semi-private
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
A(n) ____________________ is used as the basis for inheritance.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
A(n) ____________________ constructor is a constructor with no parameters.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
The type of polymorphism that applies specifically to objects of the same parent class is sometimes called ____ polymorphism.

A)subtype
C)dual
B)subclass
D)inherited
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
The ____________________ establishes an object by reserving enough memory space for it and possibly initializing member variables.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
A(n) ____________________ conversion is made whenever you assign a derived class object to an object of any types that are ancestors.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
A(n) ___________________ is another name for a child class and derived class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
If the class Poodle inherits from the class Dog, then Dog is a(n) ____________________ of Poodle.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
When you override a method in a child class, you create a method with the same name and ____________________ as the parent's version.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
A(n) ____________________ class is one from which you can inherit, but not create, any object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Classes that depend on field names from parent classes are said to be ____________________ because they are prone to errors.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
The capability to inherit from more than one class is called ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Professional programmers constantly create new class ____________________ for use with OOP languages.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Reliable code has been thoroughly ____________________ and can probably be used in a variety of situations.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
A method in a parent class must be ____________________ in order to be used by the child class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.