CMSC 132 Midterm 1 Exam Questions With 100% Correct Answers | Verified | Latest Update
Provide an example that illustrates procedural abstraction - ANSOne example: a function that sorts data, but we don't indicate how to sort it. the private access specifier - ANSMention one Java language feature that allow us to implement encapsulation. Yes, as finalize() is called when an object is garbage collected - ANSYou 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). - ANSshould you use an enumerated type vs. a class? Briefly explain. Both the View and Controller. - ANSFor 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. - ANSWhat 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" - ANSthrow new IllegalArgumentException("Invalid Argument");
Escuela, estudio y materia
- Institución
- CMSC 132
- Grado
- CMSC 132
Información del documento
- Subido en
- 3 de julio de 2024
- Número de páginas
- 3
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
cmsc 132 midterm 1 exam questions with 100 correc