CIS 211 MODULE 3 CHECK YOUR UNDERSTANDING

CIS 211 MODULE 3 CHECK YOUR UNDERSTANDING

1.	A(n) ______ is a C++ construct that enables a programmer to define a new data type.
a.    class
b.    method
c.    data field
d.    object
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
2.	A function can indicate that an error has occurred by ______ an exception.
a.    throwing
b.    catching
c.    implementing
d.    declaring
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
3.	A client program depends solely on the ______ of the ADT.
a.    data members
b.    structure
c.    implementation
d.    behavior
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
4.	A C++ class contains data members and ______.
a.    clients
b.    interfaces
c.    methods
d.    data structures
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
5.	Object-oriented programming views a program as ______.
a.    a sequence of actions
b.    a collection of classes
c.    a group of methods
d.    an interaction among objects
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
6.	The insertion operation of the ADT list can insert new items ______.
a.    only at the front of the list
b.    only at the end of the list
c.    only in the middle of the list
d.    into any position of the list
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
7.	The ADT sorted list inserts and deletes items by their ______.
a.    name
b.    value
c.    position name
d.    position number
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
8.	Which of the following operations of the ADT list changes the list?
a.    remove
b.    isEmpty
c.    size
d.    get
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
9.	A(n) ______ is an instance of a class.
a.    method
b.    data field
c.    interface
d.    object
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
10.	An ADT's operations are known as its _______.
a.    interfaces
b.    variables
c.    methods
d.    axioms
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	0
11.	Which of the following is true about runtime exceptions?
a.    they must be handled locally
b.    they must be explicitly thrown from the method
c.    they are used in situations where the method has encountered a serious problem
d.    they can often be prevented by fail-safe programming
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
12.	Which of the following is true about a constructor in C++?
a.    a constructor cannot have parameters
b.    a constructor has the same name as the class
c.    a class can only have a single constructor
d.    all constructors have a return type of void
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
13.	The specifications of an ADT's operations indicate ______.
a.    what the operations do
b.    how to implement the operations
c.    how to store the data in the ADT
d.    how to carry out the operations
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
14.	Which of the following is true about a destructor in C++?
a.    a class can have several destructors
b.    the compiler will generate a destructor if the programmer does not provide one
c.    a programmer must provide a destructor for every class
d.    a destructor destroys all instances of a class
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
15.	A(n) ______ allows two modules to communicate with each other.
a.    data structure
b.    axiom
c.    interface
d.    client
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
16.	The items in the ADT list are referenced by ______.
a.    name
b.    value
c.    position number
d.    position name
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
17.	Encapsulation combines an ADT's data with its operations to form a(n) ______.
a.    exception
b.    method
c.    variable
d.    object
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
18.	In the following list which element does not have a predecessor?
John, Kate, Fred, Mark, Jon, Adam, Drew
a.    Kate
b.    Drew
c.    Mark
d.    John
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
19.	In the ADT list, when an item is inserted into position i of the list, ______.
a.    the position of all items is increased by 1
b.   the position of each item that was at a position smaller than i is decreased by 1 while the position of 
each item that was at a position greater than i is increased by 1
c.   the position of each item that was at a position greater than i is increased by 1
d.   the position of each item that was at a position smaller than i is increased by 1
Hint:Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
20.	In C++, each class definition should be placed in a(n) ______.
a.    implementation file
b.    header file
c.    namespace
d.    package
Hint: Chapter 3
SLO3:Identify array-based implementations.
LO3B:Implement ADTs.
	1
Computer Science Assignment Help, Computer Science Homework help, Computer Science Study Help, Computer Science Course Help
 


Answer Detail

Get This Answer

Invite Tutor