CPSC 2150 Exam 2 || with Complete Solutions.
A _____ can implement a _____ in Java. correct answers Class, Interface Abstract Class, Interface A _____ can extend a _____ in Java. correct answers Class, Class Interface, Interface Class, Abstract Class Newer Versions of Java (after Java 8) allow for private data fields in an interface, allowing you to write code for the methods that access the private data in the interface. correct answers False New versions of Java (8 and later) allow for code in our interface file as long as its a _____ method correct answers Default A(n) _____ method or operation is not required for the class to be useful because it can be implemented by calling other existing methods or operations. correct answers Secondary In order to pass in a data type TYPE for the parameterized data type of a generic class, TYPE must be a _____ data type. correct answers Reference Consider the following code: List<Integer> myList = new ArrayList<>(); Integer X = 36; myL(X); X = 42; Will myList contain the number 42 after the code runs? correct answers No Which of the following can be in a Abstract Class (syntactically allowed by Java) correct answers Any type of private methods Private data Public methods (with a body) Public abstract methods A _____ has occurred when the observed output did not match the expected output. correct answers Failure An _____ is when an further processing will result in the observed output not matching the expected output. correct answers Erroneous state A _____ is the algorithmic cause of the observed not matching the expected output. correct answers Fault In order to have a complete test case, you need to have ... correct answers A set of specific input values A set of specific output values
Written for
- Institution
- CPSC 2150
- Course
- CPSC 2150
Document information
- Uploaded on
- March 25, 2024
- Number of pages
- 6
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
a can implement a in java
Also available in package deal