Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Data Structures and Abstractions with Java, 5th edition — by Frank Carrano — Complete Test Bank (Ch. 1-30)

Beoordeling
-
Verkocht
-
Pagina's
229
Cijfer
A+
Geüpload op
04-04-2026
Geschreven in
2025/2026

Data Structures and Abstractions with Java, 5th edition — by Frank Carrano — Complete Test Bank (Ch. 1-30)

Instelling
Data Structures And Abstractions With Java
Vak
Data Structures and Abstractions with Java

Voorbeeld van de inhoud

TEST BANK
Data Structures and Abstractions with Java, 5th edition
by Frank Carrano, Timothy Henry
LU
XE
LI
BR
AR
Y

, TABLE OF CONTENT

Bags
Java Interlude 1 Generics
Bag Implementations That Use Arrays
Java Interlude 2 Exceptions
A Bag Implementation That Links Data
The Efficiency of Algorithms
Stacks
Stack Implementations
Java Interlude 3 More About Exceptions
Queues, Deques, and Priority Queues
Queue, Deque, and Priority Queue Implementations
LU
Recursion
Lists
A List Implementation That Uses an Array
A List Implementation That Links Data
Java Interlude 4 Iterators
Iterators for the ADT List
XE
Problem Solving With Recursion
Java Interlude 5 More About Generics
An Introduction to Sorting
Faster Sorting Methods
Java Interlude 6 Mutable and Immutable Objects
LI
Sorted Lists
Java Interlude 7 Inheritance and Polymorphism
Inheritance and Lists
Searching
BR
Java Interlude 8 Generics Once Again
Dictionaries
Dictionary Implementations
Introducing Hashing
Hashing as a Dictionary Implementation
Trees
AR
Tree Implementations
Java Interlude 9 Cloning
A Binary Search Tree Implementation
A Heap Implementation
Balanced Search Trees
Graphs
Y
Graph Implementations
Appendices
A. Documentation and Programming Style
B. Java Classes
C. Creating Classes from Other Classes

, KJHGFDSA


Chapter 1 - Bags



True/False (10) All Chapters Included

1. An abstract data type is not necessarily a collection.
All Answers Included
Answer: true

2. A collection is not necessarily an abstract data type.
LU
Answer: false

3. Entries of a bag can belong to classes related by inheritance.

Answer: true
XE
4. Entries of a bag may belong to different classes because items are unordered.

Answer: false

5. All entries of a bag must have the same data type or a subtype of that data type.
LI
Answer: true

6. By declaring a data type to be a BagInterface, we can replace the bag class with another class
that implements the BagInterface.
BR
Answer: true

7. A method can change the state of an object passed to it as an argument.

Answer: true
AR
8. A set is a special kind of bag.

Answer: true

9. You cannot determine the exact number of times a particular item appears in a bag because it is
unordered.
Y
Answer: false

10. Code written with respect to an interface makes it difficult to replace one implementation of a
bag with another.

Answer: false




jkhgfdsa

, KJHGFDSA


Short Answer (5)

1. Explain the rationale for returning a Boolean value from the add bag operation.

Answer: A client should know what happened. A Boolean value indicates true for success or false
for a failed operation.

2. Explain why writing a test program before implementing a class is a good idea.

Answer: It helps you understand the specifications before committing to your design and
LU
implementation.

3. Explain why the set ADT does not need a getFrequencyOf operation.

Answer: Because sets do not contain duplicate items, only a 0 for absence or 1 for presence of an
item would be returned. Using a contains method is a better design.
XE
4. What is the design rationale for providing a toArray method instead of a displayBag method?

Answer: The user/client is free to display any or all of the items in any way desired.

5. Explain why null is a potential return value for the remove operation.
LI
Answer: It is a value that cannot be in the bag and therefore signals a problem if, for example, a
client tries to remove an entry from an empty bag.
BR
Multiple Choice (30) WARNING: CORRECT ANSWERS ARE IN THE SAME POSITION AND TAGGED
WITH **. YOU SHOULD RANDOMIZE THE LOCATION OF THE CORRECT ANSWERS IN YOUR EXAM.

1. A language-independent specification for a group of values and operations on those values is
called a/an:
AR
a. abstract data type **
b. data structure
c. collection
d. primitive

2. An implementation of an ADT with a programming language is called a/an:
Y
a. data structure **
b. abstract data type
c. collection
d. primitive

3. An object that groups other objects and provides services to its clients is called a/an:
a. collection **




jkhgfdsa

Gekoppeld boek

Geschreven voor

Instelling
Data Structures and Abstractions with Java
Vak
Data Structures and Abstractions with Java

Documentinformatie

Geüpload op
4 april 2026
Aantal pagina's
229
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€19,35
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kan je een ander document kiezen. Je kan het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
LuxeLibrary Rasmussen College
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
426
Lid sinds
2 jaar
Aantal volgers
153
Documenten
1512
Laatst verkocht
2 dagen geleden
PassVault

PassVault is your Ultimate digital Vault for academic success - a curated hub of notes, test banks, study guides, and solution manuals designed to help you learn smarter, not harder. Unlock top-tier resources trusted by students who aim higher. Unlock knowledge. Master your Exams. No more stress. Just Results.

3,8

35 beoordelingen

5
17
4
7
3
3
2
2
1
6

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen