Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 129 pages
Exam (elaborations)

Test Bank - Data Abstraction & Problem Solving with C++: Walls and Mirrors 7th Edition ( Frank Carrano, 2016), Chapter 1-21

Document preview thumbnail
Preview 4 out of 129 pages

Test Bank - Data Abstraction & Problem Solving with C++: Walls and Mirrors 7th Edition ( Frank Carrano, 2016), Chapter 1-21

Content preview

TEST BANK
Data Abstraction & Problem Solving with C++: Walls and Mirrors 7th Edition


by Frank Carrano, Timothy Henry
ST
U
D
YL
AB

, Table of Content
1.Data Abstraction: The Walls
2.Recursion: The Mirrors
3.Array-Based Implementations
4.Link-Based Implementations
5.Recursion as a Problem-Solving Technique
6.Stacks
7.Stack Implementations
8.Lists
9.List Implementations
10.Algorithm Efficiency
ST
11.Sorting Algorithms and Their Efficiency
12.Sorted Lists and Their Implementations
13.Queues and Priority Queues
U
14.Queue Implementations
15.Trees
16.Tree Implementations
D
17.Heaps
18.Dictionaries and Their Implementations
YL
19.Balanced Search Trees
20.Graphs
21.Processing Data in External Storage
AB

, jhgfdsa



Multiple Choice Questions

1. 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
Answer: a.

2. Data structures are part of an ADT’s .
a. definition
b. implementation
c. specifications
d. usage
Answer: b.
ST
3. A(n) allows two modules to communicate with each other.
a. data structure
b. axiom
c. interface
d. client
Answer: c.
U
4. An ADT’s govern(s) what its operations are and what they do.
a. specifications
b. implementation
D
c. documentation
d. data structure
Answer: a.
YL
5. When each module performs one well-defined task, we say that it is .
a. loosely coupled
b. highly coupled
c. cohesive
d. not easily reused
Answer: c.
AB
6. When should an operation contract be written?
a. during analysis
b. after coding
c. at the same time as user documentation
d. when taking initial notes from client
Answer: a.

7. What information is included in the operation contract?
a. the method’s interface
b. data flow among the modules
c. assumptions about input
d. all of these
Answer: d.

8. What kind of interface contains a method if and only that method is essential to that class’s
responsibilities?
a. complete
b. minimal




iuytrewq

, jhgfdsa


c. expanded
d. compact
Answer: b.

9. What must be known about the ADT Bag in order to use it in a program?
a. how entries in the bag are represented
b. how bag operations are implemented
c. how many entries can be stored in the bag
d. the interface of the bag
Answer: d.

10. According the CRC specifications for a Bag, which of the following behaviors would not be one of the
responsibilities of the class Bag?
a. See if the bag is empty
b. See if the bag is full
c. Look at all the objects in the bag
ST
d. Count the number of times a certain object occurs in the bag
Answer: b.


11. A client program depends solely on the of the ADT.
a. data members
b. structure
U
c. implementation
d. behavior
Answer: d.
D
12. What should a programmer do before implementing a recently designed class?
a. write code that uses the class
b. check comments that document specifications
c. adjust the design when problems are discovered
YL
d. all of these
Answer: d

13. Object-oriented programming views a program as .
a. a sequence of actions
b. a collection of classes
AB
c. a group of methods
d. an interaction among objects
Answer: d.

14. An ADT’s operations are known as its .
a. axioms
b. methods
c. variables
d. interfaces
Answer: b.

15. Encapsulation combines an ADT’s data with its operations to form a(n) .
a. exception
b. method
c. object
d. variable
Answer: c.

16. A(n) is a C++ construct that enables a programmer to define a new data type.




iuytrewq

Document information

Uploaded on
May 7, 2026
Number of pages
129
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$19.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Studylab
3.8
(74)
Sold
725
Followers
460
Items
1515
Last sold
1 week ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions