java 8) When an \"is a\" relationship exists between objects, it means that the
ID: 3834511 • Letter: J
Question
java
8)
When an "is a" relationship exists between objects, it means that the specialized object has
_
A)
Some of the characteristics of the general class, but not all, plus additional characteristics
B)
Some of the characteristics of the general object, but not all
C)
None of the characteristics of the general object
D)
All the characteristics of the general object, plus additional characteristics
9)
If a class contains an abstract method,
_
A)
You must create an instance of the class
B)
The method cannot be overridden in derived classes
C)
The method will have only a header, but not a body, and end with a semicolon
D)
All of the above
10)
Look at the following code. The method in line ________ will override the method in line __________.
Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public int method1(int a){}
Line 5 public int method2(int b){}
Line 6 }
Line 7 public ClassB extends ClassA
Line 8 {
Line 9 public ClassB(){}
Line 10 public int method1(int b){}
Line 11 public int method2(double c){}
_
A)
5, 11
B)
11, 5
C)
10, 4
D)
4, 10
11)
Given the following code which of the following is true?
public class ClassB implements ClassA
_
A)
ClassB must override each method in ClassA
B)
ClassA must override each method in ClassB
C)
ClassB is derived from ClassA
D)
ClassA is derived from ClassB
Explanation / Answer
for question 8), answer is
D) All the characteristics of the general object, plus additional characteristics
for question 9), answer is
C) The method will have only a header, but not a body, and end with a semicolon
for question 10), answer is
C) 10, 4
for question 11), answer is
A) ClassB must override each method in ClassA
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.