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
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

CPS 202 Final Exam Review Questions with Verified Answers.

Document preview thumbnail
Preview 2 out of 5 pages

CPS 202 Final Exam Review Questions with Verified Answers. The header public boolean equals(Date otherDate) is best described as an: A. overload of the equals method B. override of the equals method C. masking of the equals method D. overbooking of the equals method - Correct answer A The Model-Delegate design pattern only works with GUI programming (T/F) - Correct answer F Most, but not all, of the wrapper classes are spelled the same as the keyword for the primitive data type that they "wrap," but with an initial capital letter. Which wrappers don't follow this rule? A. Float, Double B. Integer, Short, Long C. Integer, Character D. Character, Byte

Content preview

CPS 202 Final Exam Review Questions with Verified
Answers.
The header public boolean equals(Date otherDate) is best described as an:

A. overload of the equals method
B. override of the equals method
C. masking of the equals method
D. overbooking of the equals method - Correct answer A

The Model-Delegate design pattern only works with GUI programming (T/F) - Correct
answer F

Most, but not all, of the wrapper classes are spelled the same as the keyword for the
primitive data type that they "wrap," but with an initial capital letter. Which wrappers
don't follow this rule?

A. Float, Double
B. Integer, Short, Long
C. Integer, Character
D. Character, Byte - Correct answer C

An instance variable of a class can be of an array type (T/F) - Correct answer T

A copy constructor should:
(1) be a constructor with a single argument of the same type as the class
(2) create an entirely spearate object, with identical data values as in the original
object
(3) never use the new operator (because it causes data leaks)
(4) be created when a class contains instance variables that are of non-primitive
types

A. Only statement (3) is false
B. All four statements are true
C. (1) and (2) are true
D. Only statement (4) is false - Correct answer A

The Model-View-Controller design pattern only works with GUI programming (T/F) -
Correct answer F

Which of the following is true?

A. An interface may not have any instance variables
B. An interface may not have any constructors
C. An interface may have abstract methods

, D. All of the above
E. None of the above - Correct answer D

A common use of inner classes is

A. clean up
B. burn down
C. helper
D. all of the above - Correct answer C

In even the most basic Java GUI programming, the JFrame class contains many
methods that must be overridden (T/F) - Correct answer F

A button fires events known as

A. static events
B. passive events
C. dormant events
D. action events - Correct answer D

A Java generic is a class or method that includes a type as a parameter (T/F) -
Correct answer T

The ___ manager is the simplest layout manager in Java. It arranges components
one after the other, going from left to right, in order in which you add them

A. BorderLayout
B. FlowLayout
C. GridLayout
D. AbsoluteLayout - Correct answer B

Anonymous classes are not supported in Java (T/F) - Correct answer F

A list is an abstract data type that is sequential, homogeneous, and dynamic (T/F) -
Correct answer T

The most common relationships among classes are inheritance, composition,
association, and aggregation (T/F) - Correct answer T

In the Model-View-Controller pattern, a passive View contains a reference to the
Controller, but not to the model (T/F) - Correct answer F

The first node in a linked list is often referred to as the ___ node.

A. head
B. tail

Document information

Uploaded on
February 8, 2025
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$18.49

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.
Excellentgrader
4.0
(23)
Sold
116
Followers
92
Items
6637
Last sold
2 months 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