100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CMSC132 Study Guide 3. Questions and Answers 100% Correct

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

CMSC132 Study Guide 3.

Institution
CMSC 132
Course
CMSC 132








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

Written for

Institution
CMSC 132
Course
CMSC 132

Document information

Uploaded on
June 23, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

CMSC132 Study Guide 3

What methods are in the Comparable interface? – answer compare To()

What methods are in the Comparator interface? – answer compare()

You cannot instantiate an abstract class. - answer True

An abstract class allows inheritance. - answer True

An abstract class is useful for polymorphism - answer True

If a class contains an abstract method then the class must be declared as abstract -
answer True

If a class is declared as abstract then the class must contain at least one abstract
method - answer False

Code inside the abstract class can make calls to methods of the class that are declared
abstract - answerTrue

A concrete (non-abstract) class extending an abstract class must provide
implementations for the abstract methods of the class - answerTrue

An abstract class can be used as a type - answerTrue

An abstract class can be used as the type for a "polymorphic collection" - answerTrue

Name an advantage of using interfaces over abstract classes - answerAn advantage of
interfaces is that you can implement as many interfaces as you want in a class.

Name an advantage of using abstract classes over interfaces - answerAn advantage of
abstract classes is inheritance.

You should be prepared to write Junit tests -
answerhttp://www.cs.umd.edu/eclipse/JUnitTesting.html

When should you "throw" an exception? - answerWhen an exceptional event has
occurred that might break your code

Describe Java exception handling in detail. Be sure to mention "throw", "catch", and the
role of the call stack. - answer-pops off each stack until it finds catch block, if not
terminate program, will not run code until it find catch block.

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
478
Member since
2 year
Number of followers
293
Documents
21304
Last sold
1 week ago

4.0

115 reviews

5
60
4
22
3
18
2
2
1
13

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

Frequently asked questions