Ch 14 Sebasta 12 OOP
[Sebesta12Quiz] What is NOT true about abstract classes and abstract methods? Abstract classes cannot be instantiated as is Abstract classes must define their declared methods An abstract class must have at least one abstract method Instantiated classes of abstract classes must define all abstract methods Abstract classes must include at least one concrete method
Abstract classes must define their declared methods
Sebesta12Quiz] Which is NOT a true statement about the common traits of C++ and Java? Both allow classes to be defined without requiring a parent class Both require a parent class constructor to be called before a child class constructor is called Both support object and non-object data Both support object-oriented programming paradigms Both support single inheritance
Both allow classes to be defined without requiring a parent class
[Sebesta12Quiz] In Java, what is the process of implicitly coercing a primitive value into object context called? Boxing Closure Encapsulation Objectifying Subtyping
Boxing
[Sebesta12Quiz] C# uses the syntax of _____ for defining classes. Java Python Objective-C C++ C structure
C++
[Sebesta12Quiz] In which of the following language supporting multiple inheritance requires just one additional array access and one extra addition operation for each dynamically bound method call, at least with some machine architectures? C++ Ruby JavaScript Prolog Javascript
C++
[Sebesta12Quiz] Which of the following was the first widely used object-oriented programming language and is still one of the most popular programming languages? Fortran COBOL C++ C Smalltalk
C++
What is not a key feature of object-oriented programming? Abstract data types Closures Dynamic binding Inheritance
Closures
In the C++ definition of an inherited class, the name of the inherited class has the name of the base class attached with what symbol? Ampersand Colon Comma Semicolon
Colon
[Sebesta12Quiz] What is a primary purpose for the use of nested classes? Abstraction Information hiding Inheritance Polymorphism Subtyping
Information hiding
[Sebesta12Quiz] ____ offers a solution to both the modification problem posed by abstract data type reuse and the program organization problem. Abstraction Polymorphism Inheritance Encapsulation Type
Inheritance
[Sebesta12Quiz] _____ operate only on the objects of the class. Class methods Class variables Instance methods Instance variables virtual methods
Instance methods
Sebesta12Quiz] What structures in Java provide partial support for multiple inheritance? Categories Classes Closures Interfaces Containers
Interfaces
[Sebesta12Quiz] C# includes both classes and structs, with the classes being very similar to _______ classes and the structs being somewhat less powerful stack-dynamic constructs. C C++ Java JavaScript Python
Java
What key feature of object oriented programming is dynamic dispatch an example of? Abstraction Closure Encapsulation Polymorphism
Polymorphism
[Sebesta12Quiz] What type of functions must be included in an abstract class in C++? Completely defined functions Parametric functions Pure virtual functions Void functions Friend functions
Pure virtual functions
[Sebesta12Quiz] For which language the concept of an object is truly universal? Ruby Python Smalltalk C# C++ Java
Smalltalk
[Sebesta12Quiz] The integrated use of windows, mouse-pointing devices, and pop-up and pull-down menus, all of which first appeared in ______, dominate contemporary software systems. Objective-C Smalltalk JavaScript Python C++ Java
Smalltalk
[Sebesta12Quiz] What was the first language to offer complete support for object- oriented programming? Python C Smalltalk Java Algol
Smalltalk
[Sebesta12Quiz] Which language adopts none of the appearance of the imperative languages and its purity of purpose is reflected in its simple elegance and uniformity of design? Objective C PHP JavaScript Smalltalk C++ Java
Smalltalk
[Sebesta12Quiz] ______ is essentially typeless, meaning that all code is effectively generic. Lisp Smalltalk Prolog C# Java
Smalltalk
[Sebesta12Quiz] In C++, how many constructors are required to be defined explicitly in a class definition? Zero One Three Two at least one
Zero
[Sebesta12Quiz] A class that includes at least one abstract method is called _____. interface base class inheritance abstract class abnormal class
abstract class
[Sebesta12Quiz] In C++, classes are defined as extensions of C's record structures—structs. This form of this structure (for the instance variables of class) is called a ____. class container class virtual table class factory class instance record class structure library
class instance record
[Sebesta12Quiz] The abstract data types in object-oriented languages, following the lead of SIMULA 67, are usually called _____. classes objects functions methods interfaces
classes
[Sebesta12Quiz] In C++, what operator is used to explicitly deallocate heap-dynamic objects? deallocate delete new remove free
delete
[Sebesta12Quiz] The third characteristic (after abstract data types and inheritance) of object oriented programming languages is a kind of polymorphism provided by the dynamic binding of messages to method definitions. This is sometimes called ______. static dispatch dynamic dispatch heap allocated dynamic encapsulation dynamic polymorphism
dynamic dispatch
The ____ attached to the name of the setter method means that its variable is assignable. less than sign ( < ) equal sign (=) greater than sign ( > ) dot sign ( . )
equal sign (=)
[Sebesta12Quiz] All Java objects are ____. explicit heap dynamic implicit heap dynamic stack dynamic static
explicit heap dynamic
[Sebesta12Quiz] What keyword in Java ensures a class cannot be derived from to make inherited classes? abstract final finalize ultimate const static
final
[Sebesta12Quiz] Non-static classes that are nested directly in another class are called _______. outer classes inner classes external classes internal classes virtual classes
inner classes
[Sebesta12Quiz] A language that is object oriented must provide support for this ____ key language features? abstract data types inheritance dynamic binding of method calls to methods encapsulation interface
interface
[Sebesta12Quiz] The entire collection of methods of an object is called the _____ of the object. object protocol or object interface message protocol or message interface function protocol or function interface class protocol or class interface container factory
message protocol or message interface
[Sebesta12Quiz] The calls to methods are sometimes called ______. messages objects functions classes interfaces services
messages
[Sebesta12Quiz] The subprograms that define the operations on objects of a class are called _______. classes objects functions methods constructors
methods
[Sebesta12Quiz] The class in which the new class is nested is called the _______. complex class nesting class subclass superclass complex class
nesting class
[Sebesta12Quiz] The concept of ______ had its roots in SIMULA 67 but was not fully developed until the evolution of Smalltalk resulted in Smalltalk 80? functional programming procedural programming generic programming object-oriented programming aspect-oriented programming
object-oriented programming
[Sebesta12Quiz] A class from which the new class is derived is its _____. derived class or subclass abstract class or interface parent class or superclass concrete class or subtype delegate class or inheritance
parent class or superclass
[Sebesta12Quiz] If a new class is a subclass of a single parent class, then the derivation process is called ______. If a class has more than one parent class, the process is called ________. single inheritance; multiple inheritance single polymorphism; multiple polymorphism single encapsulation; multiple encapsulation single abstraction; multiple abstraction single type; multiple types
single inheritance; multiple inheritance
[Sebesta12Quiz] Unlike Smalltalk and most other languages that support object-oriented programming, a C++ class can also be stand-alone, without a(n) ______. superclass subclass abstract class derived class interface
superclass
Sebesta12Quiz] In C++, the storage structure for the list (of dynamically bound methods of a class instance) is often called a ______. virtual method table stack method table method hash table virtual linked list dynamic method table
virtual method table