Deck 5: Object-Oriented Programming

Full screen (f)
exit full mode
Question
In Smalltalk,a message is a request for a service.
Use Space or
up arrow
down arrow
to flip the card.
Question
Extending an object is one way that a software component can be modified for reuse.
Question
Multiple inheritance in C++ ordinarily creates separate copies of each class on an inheritance path.
Question
The history of object-oriented programming languages begins in the 1960s with the Simula project.
Question
C++ member functions that are given implementations in a class declaration are automatically assumed to be inline.
Question
C++ has built-in garbage collection.
Question
Referencing is the ability of a class to use the behavior and/or properties of classes above it in its hierarchy.
Question
Smalltalk provides a small set of binary messages that allow the programmer to write arithmetic and comparison expressions.
Question
In C++,template classes can be used to define generic collections.
Question
Smalltalk uses value semantics,such that variables refer to an object's value.
Question
All built-in classes in Smalltalk are subclasses of the Object class.
Question
Abstraction is the collection of similar operations from two different components into a new component.
Question
In Java,scalar data types are objects for reasons of efficiency.
Question
The unique structure of each application is referred to as an application framework.
Question
Public members are those accessible to client code as well as to derived classes.
Question
Object-oriented programs consist of a set of objects that execute by acting and reacting to each other,much the same way that a real-world process proceeds.
Question
Messages in Smalltalk that expect arguments are called parameterized messages.
Question
In C++,instance variables and methods are both called descriptors.
Question
Abstract classes are often instantiated by the application program.
Question
When a constructor calls another constructor,it is called constructor teaming.
Question
In Smalltalk,____ messages expect no arguments.

A) single
B) unary
C) inquisitive
D) redirecting
Question
C++ permits an object to be allocated either directly on the stack or as a pointer.
Question
____ is the use of the same names for messages requesting similar services from different classes.

A) Polymorphism
B) Overshadowing
C) Distinction
D) Generalization
Question
Restricting access to internal details of software components is known as ____.

A) abstraction
B) encapsulation
C) polymorphism
D) redefinition
Question
An object in Smalltalk that contains code is called a ____.

A) block
B) snippet
C) routine
D) module
Question
When a language's variables refer to objects,we say that the language uses ____ semantics.

A) value
B) object
C) reference
D) abstract
Question
In Smalltalk,the object that receives a message performs its service by invoking an appropriate ____.

A) method
B) function
C) procedure
D) sub-routine
Question
In Smalltalk,messages that result in the change of state in the receiver are called ____.

A) modifiers
B) relays
C) mutators
D) adjustors
Question
In C++,objects can only be allocated on the heap.
Question
In Smalltalk,an object's ____ is the set of messages it recognizes.

A) command list
B) interface
C) operator list
D) listener set
Question
Smalltalk and Java require the use of a garbage collector to return inaccessible storage to the heap.
Question
In Java,scalar data types are also called ____ types.

A) primitive
B) simple
C) quantitative
D) flexible
Question
____ is an important need satisfied by object-oriented programming.

A) Rapid prototyping
B) Program component dependence
C) Abstract data typing
D) Independence of software components
Question
Applications normally create and manipulate instances of ____ classes in Smalltalk.

A) abstract
B) concrete
C) final
D) physical
Question
The first programming language to incorporate the object paradigm in a thorough and consistent way was ____.

A) Simula67
B) Smalltalk-80
C) Fortran-80
D) Algol60
Question
When multiple inheritance is declared using the virtual keyword,separate copies of each class on an inheritance path are created.
Question
The Smalltalk block object is enclosed in ____.

A) [ ]
B) { }
C) ( )
D) < >
Question
A(n)____ message is sent to a class in Smalltalk.

A) object
B) class
C) control
D) constructor
Question
Java and Smalltalk both allocate objects directly onto the stack for efficiency.
Question
____ binding is the binding of messages to methods based on the class of the receiver object.

A) Automatic
B) Static
C) Adaptive
D) Dynamic
Question
C++ includes ____,which specify how to deallocate memory for objects.

A) deallocators
B) garbage collectors
C) destructors
D) erasers
Question
____ can belong to more than one class.

A) Supermethods
B) Multimethods
C) Global methods
D) Variable methods
Question
A function is considered to be ____ if a compiler may replace the function call by the actual code for the function.

A) inline
B) substitutable
C) redirectable
D) virtual
Question
Member functions can be implemented outside the declaration of a class in C++ using the ____ operator.

A) scope altering
B) redirection
C) directive
D) scope resolution
Question
In C++,a pure virtual declaration is a function declared with the keyword virtual and ____.

A) the keyword null
B) a pointer
C) parentheses
D) the keyword void
Question
Java uses ____ to deallocate objects that are no longer needed.

A) garbage collection
B) destructors
C) scope resolution
D) memory functions
Question
To avoid repeated inheritance,one must ____.

A) declare the inheritance using the virtual keyword
B) declare the inheritance using the shared keyword
C) use a private inner class
D) use an inherited function
Question
In C++,____ members are accessible by derived classes.

A) private
B) restricted
C) protected
D) extensible
Question
In Java,the ____ constructor takes no parameters.

A) chained
B) overloaded
C) default
D) base
Question
Java uses ____ to implement method lookup.

A) a jump table
B) an inheritance tree
C) restricted access
D) polymorphism
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 5: Object-Oriented Programming
1
In Smalltalk,a message is a request for a service.
True
2
Extending an object is one way that a software component can be modified for reuse.
True
3
Multiple inheritance in C++ ordinarily creates separate copies of each class on an inheritance path.
True
4
The history of object-oriented programming languages begins in the 1960s with the Simula project.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
C++ member functions that are given implementations in a class declaration are automatically assumed to be inline.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
C++ has built-in garbage collection.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Referencing is the ability of a class to use the behavior and/or properties of classes above it in its hierarchy.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Smalltalk provides a small set of binary messages that allow the programmer to write arithmetic and comparison expressions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
In C++,template classes can be used to define generic collections.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Smalltalk uses value semantics,such that variables refer to an object's value.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
All built-in classes in Smalltalk are subclasses of the Object class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Abstraction is the collection of similar operations from two different components into a new component.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
In Java,scalar data types are objects for reasons of efficiency.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
The unique structure of each application is referred to as an application framework.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Public members are those accessible to client code as well as to derived classes.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Object-oriented programs consist of a set of objects that execute by acting and reacting to each other,much the same way that a real-world process proceeds.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Messages in Smalltalk that expect arguments are called parameterized messages.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
In C++,instance variables and methods are both called descriptors.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Abstract classes are often instantiated by the application program.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
When a constructor calls another constructor,it is called constructor teaming.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
In Smalltalk,____ messages expect no arguments.

A) single
B) unary
C) inquisitive
D) redirecting
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
C++ permits an object to be allocated either directly on the stack or as a pointer.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
____ is the use of the same names for messages requesting similar services from different classes.

A) Polymorphism
B) Overshadowing
C) Distinction
D) Generalization
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Restricting access to internal details of software components is known as ____.

A) abstraction
B) encapsulation
C) polymorphism
D) redefinition
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
An object in Smalltalk that contains code is called a ____.

A) block
B) snippet
C) routine
D) module
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
When a language's variables refer to objects,we say that the language uses ____ semantics.

A) value
B) object
C) reference
D) abstract
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
In Smalltalk,the object that receives a message performs its service by invoking an appropriate ____.

A) method
B) function
C) procedure
D) sub-routine
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
In Smalltalk,messages that result in the change of state in the receiver are called ____.

A) modifiers
B) relays
C) mutators
D) adjustors
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
In C++,objects can only be allocated on the heap.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
In Smalltalk,an object's ____ is the set of messages it recognizes.

A) command list
B) interface
C) operator list
D) listener set
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Smalltalk and Java require the use of a garbage collector to return inaccessible storage to the heap.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
In Java,scalar data types are also called ____ types.

A) primitive
B) simple
C) quantitative
D) flexible
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
____ is an important need satisfied by object-oriented programming.

A) Rapid prototyping
B) Program component dependence
C) Abstract data typing
D) Independence of software components
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Applications normally create and manipulate instances of ____ classes in Smalltalk.

A) abstract
B) concrete
C) final
D) physical
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
The first programming language to incorporate the object paradigm in a thorough and consistent way was ____.

A) Simula67
B) Smalltalk-80
C) Fortran-80
D) Algol60
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
When multiple inheritance is declared using the virtual keyword,separate copies of each class on an inheritance path are created.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
The Smalltalk block object is enclosed in ____.

A) [ ]
B) { }
C) ( )
D) < >
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
A(n)____ message is sent to a class in Smalltalk.

A) object
B) class
C) control
D) constructor
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Java and Smalltalk both allocate objects directly onto the stack for efficiency.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
____ binding is the binding of messages to methods based on the class of the receiver object.

A) Automatic
B) Static
C) Adaptive
D) Dynamic
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
C++ includes ____,which specify how to deallocate memory for objects.

A) deallocators
B) garbage collectors
C) destructors
D) erasers
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
____ can belong to more than one class.

A) Supermethods
B) Multimethods
C) Global methods
D) Variable methods
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
A function is considered to be ____ if a compiler may replace the function call by the actual code for the function.

A) inline
B) substitutable
C) redirectable
D) virtual
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
Member functions can be implemented outside the declaration of a class in C++ using the ____ operator.

A) scope altering
B) redirection
C) directive
D) scope resolution
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
In C++,a pure virtual declaration is a function declared with the keyword virtual and ____.

A) the keyword null
B) a pointer
C) parentheses
D) the keyword void
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Java uses ____ to deallocate objects that are no longer needed.

A) garbage collection
B) destructors
C) scope resolution
D) memory functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
To avoid repeated inheritance,one must ____.

A) declare the inheritance using the virtual keyword
B) declare the inheritance using the shared keyword
C) use a private inner class
D) use an inherited function
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
In C++,____ members are accessible by derived classes.

A) private
B) restricted
C) protected
D) extensible
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
In Java,the ____ constructor takes no parameters.

A) chained
B) overloaded
C) default
D) base
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Java uses ____ to implement method lookup.

A) a jump table
B) an inheritance tree
C) restricted access
D) polymorphism
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.