100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

CMSC 132 QUIZ 2. QUESTIONS AND ANSWERS FULLY SOLVED

Puntuación
-
Vendido
-
Páginas
2
Grado
A+
Subido en
23-06-2025
Escrito en
2024/2025

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

Institución
CMSC 132
Grado
CMSC 132








Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
CMSC 132
Grado
CMSC 132

Información del documento

Subido en
23 de junio de 2025
Número de páginas
2
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

CMSC 132 QUIZ 2

Immutable - answer unchangeable

modification of the state within the class is ___________ - answer expected

T/F : direct mutation by external code should not be possible! – answer T

When using the comparable interface, what would the class header look like? (use the
Dog example for reference) - answer public class Dog implements Comparable<Dog>

if you use the comparable interface, what method do you have to implement? – answer
compare To- defines the natural order

public void take Bath(Bird b)
1) what kind of objects can b represent?
2)what methods can be called on b? – answer b can represent itself and any
subclasses
any methods in the animal class or bird class

if there is an eat method in the subclass bird and superclass animal, which method is
called with b.eat( ) - answerthe one in the subclass- thats the whole idea behind
overriding

https://docs.google.com/spreadsheets/d/1pNVEAum-
5bPUAY9mZmjdJF_cP9XIxkkJrOy3zHxr8Cc/edit?usp=sharing - answer

class X extends Y implements A, B, C {...} - answerX is a subclass of Y (Y is the
superclass of X)
•A, B, C are interfaces
•X can only extend ONE thing
•X can implement many interfaces•X inherits all features of Y
•X must implement all unimplemented methods in A, B, C
•X "is a" Y (LiskovSubstitution Principle)
•X "can do" A, B, C
•An instance of X can be assigned to variables of types X, Y, A, B, C.
•An instance of X satisfies types X, Y, A, B, C
•An instance of X is only "class X".

c.contains(a) - answerTRUE if there is an element in the collections that is equal to a

default equals method is the same as - answer== (aliasing)
$17.49
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada


Documento también disponible en un lote

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Dreamer252 NBursing
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
478
Miembro desde
2 año
Número de seguidores
293
Documentos
21304
Última venta
1 semana hace

4.0

115 reseñas

5
60
4
22
3
18
2
2
1
13

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes