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
Exam (elaborations)

CMSC 132 MIDTERM 1. QUESTIONS AND ANSWERS GRADED A+

Rating
-
Sold
-
Pages
2
Grade
A+
Uploaded on
23-06-2025
Written in
2024/2025

Exam of 2 pages for the course CMSC 132 at CMSC 132 (CMSC 132 MIDTERM 1.)

Institution
CMSC 132
Course
CMSC 132

Content preview

CMSC 132 MIDTERM 1

Provide an example that illustrates procedural abstraction - answer One example: a
function that sorts data, but we don't indicate how to sort it.

the private access specified - answer Mention one Java language feature that allow us
to implement encapsulation.

Yes, as finalize() is called when an object is garbage collected - answer You would like
to generate a message when an object is garbage collected. Would you be able to
generate that message using the finalize() method? Briefly explain

When you have a fixed number of instances (e.g., phases of the moon). - answer
should you use an enumerated type vs. a class? Briefly explain.

Both the View and Controller. - answer For our first project (Clear CellGame) which
component (of the Model-View-Controller) was provided?

Using static defines a single constant for the whole class, whereas non-static defines a
constant per object. - answerWhat is difference between making a variable final static
vs. just final? In other words, what is the difference between the following two
declarations? Briefly explain.

Throw illegal argument exception with a string "Invalid Argument" - answerthrow new
IllegalArgumentException("Invalid Argument");

true - answerIs it possible to define enumerated types that have private constructors?

false - answerWhen designing object-oriented systems verbs in a problem statement
may represent classes/variables needed in the design.

Shallow copy - answerWhich kind of copying (reference, shallow or deep) is performed
by the default clone method every class has?

Procedural abstraction - answerDescribes operation without indicating how to
implement it.

Initializer - answerThe word that best describes what a constructor method does is:

When the class is loaded - answerA static initialization block is executed:

Never - answerWe can override a final method

Written for

Institution
CMSC 132
Course
CMSC 132

Document information

Uploaded on
June 23, 2025
Number of pages
2
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$16.99
Get access to the full document:

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


Also available in package deal

Thumbnail
Package deal
CMSC 132 EXAM TEST COMPILED BUNDLE
-
18 2025
$ 124.12 More info

Get to know the seller

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.
Dreamer252 NBursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
494
Member since
3 year
Number of followers
297
Documents
21489
Last sold
1 day ago

4.0

120 reviews

5
64
4
23
3
18
2
2
1
13

Recently viewed by you

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