CPSC 2150 Final Exam || with 100% Errorless Solutions.
Interface files can contain private attributes that we know we will use in every implementation correct answers False What type of data types can be the declared type? Select all correct answer correct answers Interfaces Primitive Data Types Classes What type of data types can be the dynamic type? Select all correct answers correct answers Primitive Data Types Classes An interface specification can refer to private data variables correct answers False _______________________ are used to tie our private data variables in the implementation to the abstract concepts that appear in our interface specification correct answers Correspondence What is Coding to the Interface (AKA Programming to the Interface) and how does it make it easier for your program to adapt to change in the future? correct answers Coding to the Interface means that your Declared type is always an interface type. This makes it easier to adapt to change because if you want to add in a new implementation you just need to change the constructor call and all of your code will still work since the new implementation is implementing the same interface. At which times is it safe to assume that the invariant of a class is true? correct answers After a public method has finished At the beginning of a public method After the constructor for the object has completed Which data types can be the declared type of a variable in Java? correct answers Extended Class Class Interface Abstract Class Extended Interface Which data types can be the dynamic type of a variable in java? correct answers Class Extended Class Which of the following can be in an interface file? correct answers Public Abstract methods Public static final variables Public default methods Which of the following can be in an abstract class? correct answers Public variables (all) Private methods (all) Public Abstract methods Private static methods
Escuela, estudio y materia
- Institución
- CPSC 2150
- Grado
- CPSC 2150
Información del documento
- Subido en
- 25 de marzo de 2024
- Número de páginas
- 3
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
interface files can contain private attributes tha
Documento también disponible en un lote