Cat is-a Animal
Cat is-a Jumper
Dog is-a Animal
Dog is-a Jumper
Cat has-a Animal
Beagle has-a Tail
第1题:
A.
B.
C.
D.
E.
F.
第2题:
表示了类间“is-a”的关系,而(32)表示了类之间的“contains-a”关系。
A.组合
B.引用
C.聚合
D.继承
第3题:
面向对象分析中,类与类之间的 “IS-A”关系的是一种( ),类与类之间的“IS-PART-OF”关系是一种( )。
A.依赖关系 B.关联关系 C.泛化关系 D.聚合关系A.依赖关系 B.关联关系 C.泛化关系 D.聚合关系
第4题:
第5题:
下列关于类之间关系的描述,正确的是()
第6题:
is-a关系是指()
第7题:
Which four are true?()
第8题:
public class Team extends java.util.LinkedList { public void addPlayer(Player p) { add(p); } public void compete(Team opponent) { /* more code here */ } } class Player { /* more code here */ } Which two are true?()
第9题:
Which four statements are true?()
第10题:
Cat is-a Animal
Cat is-a Jumper
Dog is-a Animal
Dog is-a Jumper
Cat has-a Animal
Beagle has-a Tail
第11题:
This code will compile.
This code demonstrates proper design of an is-a relationship.
This code demonstrates proper design of a has-a relationship.
A Java programmer using the Team class could remove Player objects from a Team object.
第12题:
Cat is-a Animal
Cat is-a Jumper
Dog is-a Animal
Dog is-a Jumper
Cat has-a Animal
Beagle has-a Tail
Beagle has-a Jumper
第13题:
______表示了对象间“is-a”的关系。
A.组合
B.引用
C.聚合
D.继承
A.
B.
C.
D.
第14题:
表示了对象间“is-a”的关系。
A.组合
B.引用
C.聚合
D.继承
第15题:
第16题:
下列关于类的描述,正确的是()
第17题:
10. interface Jumper { public void jump(); } ...... 20. class Animal {} ...... 30. class Dog extends Animal { 31. Tail tail; 32. } ...... 40. class Beagle extends Dog implements Jumper { 41. public void jump() { } 42. } ....... 50. class Cat implements Jumper { 51. public void jump() { } 52. } Which three are true?()
第18题:
对于违反里氏替换原则的两个类A和B,可以采用的候选解决方案是()
第19题:
Which two are true about has-a and is-a relationships?()
第20题:
下面说法正确的是()
第21题:
Cat is-a Jumper
Cat is-a Animal
Dog is-a Jumper
Dog is-a Animal
Beagle has-a Jumper
Cat has-a Animal
Beagle has-a Tail
第22题:
Inheritance represents an is-a relationship.
Inheritance represents a has-a relationship.
Interfaces must be used when creating a has-a relationship.
Instance variables can be used when creating a has-a relationship.
第23题:
继承表示is-a的关系
继承表示has-a的关系
要表示has-a的关系必须使用接口
可以使用实例变量表示has-a的关系
第24题:
Has-a relationships should never be encapsulated.
Has-a relationships should be implemented using inheritance.
Has-a relationships can be implemented using instance variables.
Is-a relationships can be implemented using the extends keyword.
Is-a relationships can be implemented using the implements keyword.
An array or a collection can be used to implement a one-to-many has-a relationship.
The relationship between Movie and Actress is an example of an is-a relationship.