• 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 1 out of 2 pages
Exam (elaborations)

CMSC 132 MIDTERM 1(Complete solutions)

Document preview thumbnail
Preview 1 out of 2 pages

Provide an example that illustrates procedural abstraction correct answers One example: a function that sorts data, but we don't indicate how to sort it. the private access specifier correct answers Mention one Java language feature that allow us to implement encapsulation. Yes, as finalize() is called when an object is garbage collected correct answers 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). correct answers should you use an enumerated type vs. a class? Briefly explain. Both the View and Controller. correct answers For our first project (ClearCellGame) 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. correct answers What 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" correct answers throw new IllegalArgumentException("Invalid Argument"); true correct answers Is it possible to define enumerated types that have private constructors? false correct answers When designing object-oriented systems verbs in a problem statement may represent classes/variables needed in the design. Shallow copy correct answers Which kind of copying (reference, shallow or deep) is performed by the default clone method every class has? Procedural abstraction correct answers Describes operation without indicating how to implement it. Initializer correct answers The word that best describes what a constructor method does is: When the class is loaded correct answers A static initialization block is executed: Never correct answers We can override a final method Can implement an interface correct answers An abstract class


Document information

Uploaded on
May 29, 2024
Number of pages
2
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$11.19

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.
Sold
23
Followers
6
Items
4026
Last sold
1 month 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

Whoops! We can’t load your doc right now. Try again or contact support.