Question
QUIZ: Chapter 1 Data Abstraction: The Walls The specifications of an ADTs operations indicate ______. what the operations do how to implement the operations how
QUIZ: Chapter 1 Data Abstraction: The Walls
The specifications of an ADTs operations indicate ______.
what the operations do
how to implement the operations
how to store the data in the ADT
how to carry out the operations
Data structures are part of an ADTs ______.
definition
implementation
specifications
usage
A(n) ______ allows two modules to communicate with each other.
data structure
axiom
interface
client
An ADTs ______ govern(s) what its operations are and what they do.
specifications
implementation
documentation
data structure
A client program depends solely on the ______ of the ADT.
data members
structure
implementation
behavior
Object-oriented programming views a program as ______.
a sequence of actions
a collection of classes
a group of methods
an interaction among objects
An ADTs operations are known as its ______.
axioms
methods
variables
interfaces
Encapsulation combines an ADTs data with its operations to form a(n) ______.
exception
method
object
variable
A(n) ______ is a C++ construct that enables a programmer to define a new data type.
class
method
data field
object
A C++ class contains data members and ______.
clients
interfaces
methods
data structures
A(n) ______ is an instance of a class.
method
data field
interface
object
Which of the following is true about a constructor in C++?
all constructors have a return type of void
a constructor cannot have parameters
a constructor has the same name as the class
a class can only have a single constructor
A(n) ______ is a class that inherits the members of another class.
base class
superclass
abstract class
subclass
Which of the following is true about a destructor in C++?
a class can have several destructors
the compiler will generate a destructor if the programmer does not provide one
a programmer must provide a destructor for every class
a destructor destroys all instances of a class
In C++, each class definition should be placed in a(n) ______.
implementation file
header file
namespace
package
C++ provides a mechanism for logically grouping class definitions and other declarations into a common declarative region known as a(n) ______.
namespace
interface
header
package
When defining class A so that any of its instances can invoke any of the publicly defined methods of class B, the keyword ______ precedes the name of class B.
public
global
static
final
A function can indicate that an error has occurred by ______ an exception.
throwing
catching
implementing
declaring
To ______ an exception means to deal with the error condition.
declare
catch
implement
try
Which of the following is true about runtime exceptions?
they must be handled locally
they must be explicitly thrown from the method
they are used in situations where the method has encountered a serious problem
they can often be prevented by fail-safe programming
Short Answer Questions
What are some of the benefits of modularity?
What is information hiding?
What are the three types of operations on a data collection?
What is data abstraction?
What is an abstract data type (ADT)?
What is a data structure?
What is a constructor?
Under what circumstance is a compiler-generated default constructor created?
Define the client of a class?
What is a superclass?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started