Question
Given:
class A extends B {
C tail;
}
Which is true?
- A. A HAS-A B and A HAS-A C
- B. A HAS-A B and A IS-A C
- C. A IS-A B and A HAS-A C
- D. A IS-A B and A IS-A C
- E. B IS-A A and A-HAS-A C
- F. B IS-A A and A IS-A C
C is correct.
Note
Since A extends B, it IS-A B. Since C is an instance variable in A, A HAS-A C.
PreviousNextRelated