avatar
问个入门问题。# Java - 爪哇娇娃
j*g
1
Which statement(s) are true? (Choose all that apply)
A. IS-A relationships always rely on inheritance.
B. IS-A relationships always rely on instance variables.
C. IS-A relationships always require at least two class types.
D. IS-A relationships always rely on polymorphism.
E. IS-A relationships are always tightly coupled.
答案是 A,C,D
A 简单。
我不明白另外两个
C 不一定非要class, 可以从一个接口继承阿。
D IS-A可以体现多态性,但是说always rely on好像太强了。
那位牛人指导一下?
avatar
P*e
2
c:interface is an extreme class, all of whose instance methods are abstract
d:,应该不是吧,可能想说,是靠多太来体现si a

【在 j****g 的大作中提到】
: Which statement(s) are true? (Choose all that apply)
: A. IS-A relationships always rely on inheritance.
: B. IS-A relationships always rely on instance variables.
: C. IS-A relationships always require at least two class types.
: D. IS-A relationships always rely on polymorphism.
: E. IS-A relationships are always tightly coupled.
: 答案是 A,C,D
: A 简单。
: 我不明白另外两个
: C 不一定非要class, 可以从一个接口继承阿。

avatar
j*g
3
我也觉得D要是反过来说就对了。
avatar
m*t
4
C: Interfaces are essentially pure abstract classes.
D: Where you have inheritance, you have polymorphism.
But I really think all these statements need to be put into a context - say
in Java, C++, or just pure theoretical OO.

【在 j****g 的大作中提到】
: Which statement(s) are true? (Choose all that apply)
: A. IS-A relationships always rely on inheritance.
: B. IS-A relationships always rely on instance variables.
: C. IS-A relationships always require at least two class types.
: D. IS-A relationships always rely on polymorphism.
: E. IS-A relationships are always tightly coupled.
: 答案是 A,C,D
: A 简单。
: 我不明白另外两个
: C 不一定非要class, 可以从一个接口继承阿。

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。