网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
多选题
Given: Which three are true?()
A
Cat is-a Animal
B
Cat is-a Jumper
C
Dog is-a Animal
D
Dog is-a Jumper
E
Cat has-a Animal
F
Beagle has-a Tail
参考答案
参考解析
解析:
暂无解析
更多 “多选题Given: Which three are true?()ACat is-a AnimalBCat is-a JumperCDog is-a AnimalDDog is-a JumperECat has-a AnimalFBeagle has-a Tail” 相关考题
考题
对于违反里氏替换原则的两个类A和B,可以采用的候选解决方案中,正确的是( )。A.尽量将一些需要扩展的类或者存在变化的类设计为抽象类或者接口,并将其作为基类,在程序中尽量使用基类对象进行编程 B.创建一个新的抽象类C,作为两个具体类的超类,将A和B共同的行为移动到C中,从而解决A和B行为不完全一致的问题 C.将B到A的继承关系改成组合关系 D.区分是Is-a还是Has-a。如果是Is-a,可以使用继承关系,如果是Has-a,应该改成组合或聚合关系
考题
Given:Which three are true?()
A.Cat is-a AnimalB.Cat is-a JumperC.Dog is-a AnimalD.Dog is-a JumperE.Cat has-a AnimalF.Beagle has-a TailG.Beagle has-a Jumper
考题
Given:Which two are true? ()
A.The output is mm.B.The output is mc.C.Component is-a Meter.D.Component has-a Meter.E.DeluxeThingy is-a Component.F.DeluxeThingy has-a Component.
考题
Given that: Gadget has-a Sprocket and Gadget has-a Spring and Gadget is-a Widget and Widget has-a Sprocket Which two code fragments represent these relationships? ()
A.B.C.D.E.F.
考题
面向对象分析中,类与类之间的 IS-A关系的是一种( ),类与类之间的IS-PART-OF关系是一种( )。A.依赖关系 B.关联关系 C.泛化关系 D.聚合关系A.依赖关系 B.关联关系 C.泛化关系 D.聚合关系
考题
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?()A、 Cat is-a AnimalB、 Cat is-a JumperC、 Dog is-a AnimalD、 Dog is-a JumperE、 Cat has-a AnimalF、 Beagle has-a TailG、 Beagle has-a Jumper
考题
对于违反里氏替换原则的两个类A和B,可以采用的候选解决方案是()A、尽量将一些需要扩展的类或者存在变化的类设计为抽象类或者接口,并将其作为基类,在程序中尽量使用基类对象进行编程B、创建一个新的抽象类C,作为两个具体类的超类,将A和B共同的行为移动到C中,从而解决A和B行为不完全一致的问题C、将B到A的继承关系改成组合关系D、区分是Is-a还是Has-a。如果是Is-a,可以使用继承关系,如果是Has-a,应该改成组合或聚合关系
考题
Which four are true?()A、 Has-a relationships should never be encapsulated.B、 Has-a relationships should be implemented using inheritance.C、 Has-a relationships can be implemented using instance variables.D、 Is-a relationships can be implemented using the extends keyword.E、 Is-a relationships can be implemented using the implements keyword.F、 An array or a collection can be used to implement a one-to-many has-a relationship.G、 The relationship between Movie and Actress is an example of an is-a relationship.
考题
Which two are true about has-a and is-a relationships?()A、 Inheritance represents an is-a relationship.B、 Inheritance represents a has-a relationship.C、 Interfaces must be used when creating a has-a relationship.D、 Instance variables can be used when creating a has-a relationship.
考题
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?()A、 This code will compile.B、 This code demonstrates proper design of an is-a relationship.C、 This code demonstrates proper design of a has-a relationship.D、 A Java programmer using the Team class could remove Player objects from a Team object.
考题
Which four statements are true?()A、Has-a relationships should never be encapsulated.B、Has-a relationships should be implemented using inheritance.C、Has-a relationships can be implemented using instance variables.D、Is-a relationships can be implemented using the extends keyword.E、Is-a relationships can be implemented using the implements keyword.F、An array or a collection can be used to implement a one-to-many has-a relationship.
考题
多选题Given: 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?()ACat is-a JumperBCat is-a AnimalCDog is-a JumperDDog is-a AnimalEBeagle has-a JumperFCat has-a AnimalGBeagle has-a Tail
考题
多选题Given: Which three are true?()ACat is-a AnimalBCat is-a JumperCDog is-a AnimalDDog is-a JumperECat has-a AnimalFBeagle has-a Tail
考题
多选题Which two are true about has-a and is-a relationships?()AInheritance represents an is-a relationship.BInheritance represents a has-a relationship.CInterfaces must be used when creating a has-a relationship.DInstance variables can be used when creating a has-a relationship.
考题
多选题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?()AThis code will compile.BThis code demonstrates proper design of an is-a relationship.CThis code demonstrates proper design of a has-a relationship.DA Java programmer using the Team class could remove Player objects from a Team object.
考题
多选题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?()ACat is-a AnimalBCat is-a JumperCDog is-a AnimalDDog is-a JumperECat has-a AnimalFBeagle has-a TailGBeagle has-a Jumper
考题
多选题Which four are true?()AHas-a relationships should never be encapsulated.BHas-a relationships should be implemented using inheritance.CHas-a relationships can be implemented using instance variables.DIs-a relationships can be implemented using the extends keyword.EIs-a relationships can be implemented using the implements keyword.FAn array or a collection can be used to implement a one-to-many has-a relationship.GThe relationship between Movie and Actress is an example of an is-a relationship.
热门标签
最新试卷