• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 41 pages
Exam (elaborations)

Exam 1 All Multiple Choice Updated Actual Questions With Correct Answers

Document preview thumbnail
Preview 4 out of 41 pages

Exam 1 All Multiple Choice Updated Actual Questions With Correct Answers

Content preview

Exam 1 all multiple choice UPDATED ACTUAL
QUESTIONS WITH CORRECT ANSWERS

Question 1.
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.



Question 2.
2. Data structures are part of an ADT's ______.
a. definition
b. implementation
c. specifications
d. usage

ANSWER
b.



Question 3.
3. A(n) ______ allows two modules to communicate with each other.
a. data structure
b. axiom
c. interface
d. client

ANSWER
c.






,Question 4.
4. An ADT's ______ govern(s) what its operations are and what they do.
a. specifications
b. implementation
c. documentation
d. data structure

ANSWER
a.



Question 5.
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.



Question 6.
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.



Question 7.
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.






,Question 8.
8. What kind of interface contains a method if and only that method is essential to that class's
responsibilities?
a. complete
b. minimal
c. expanded
d. compact

ANSWER
b.



Question 9.
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.



Question 10.
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
d. Count the number of times a certain object occurs in the bag

ANSWER
b.



Question 11.
11. A client program depends solely on the ______ of the ADT.
a. data members
b. structure
c. implementation
d. behavior

ANSWER
d.






, Question 12.
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 d. all of these

ANSWER
d



Question 13.
13. 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

ANSWER
d.



Question 14.
14. An ADT's operations are known as its ______.
a. axioms
b. methods
c. variables
d. interfaces

ANSWER
b.



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

ANSWER
c.

Document information

Uploaded on
October 14, 2026
Number of pages
41
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$16.99

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.
GradeGalaxy
4.3
(18)
Sold
214
Followers
6
Items
65555
Last sold
3 hours 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