AAnimal dog = new Dog(); dog.Eat(); Animal cat = new Cat(); cat.Eat();
BAnimal dog = new Dog(); dog.Eat(); Animal cat = new Cat(); cat.Sleep();
CAnimal dog = new Dog(); dog.Eat(); Cat cat = new Cat(); cat.Sleep();
DDog dog = new Dog(); dog.Sleep(); Cat cat = new Cat(); cat.Eat();
相关试题
-
在C#中,下列代码需要输出”小狗喜欢吃骨头”,“小猫蹲着睡”,则需要在Main()方法中添加的代码是() class Program { static void Main(s
-
在C#中,对于下列代码的出错描述正确的是() abstract class Cat { public void Eat() {
-
在C#中,关于以下C#代码的说法正确的是() public abstract class Animal { public abstract void Eat(); }
-
C#中下列代码运行结果是() public abstract class A { public A() { Console.Write
-
在C#中,对于下列代码的出错原因,描述正确的是() abstract class Animal { //Eat()方法报错 public abstract void